"-c android.intent.category.BROWSABLE"对"adb shell am start"有什么用?



两者之间有什么区别

adb shell am start 
-a android.intent.action.VIEW 
-d https://www.airbnb.co.uk/rooms/48033927

adb shell am start 
-a android.intent.action.VIEW 
-c android.intent.category.BROWSABLE 
-d https://www.airbnb.co.uk/rooms/48033927

注意:我知道-a android.intent.action.VIEW和不使用此如何使 ADB 表现得像真正的深度链接?,但找不到使用-c android.intent.category.BROWSABLE和不使用有什么区别

这是一个category意图可以有很多并指定为

[-c <CATEGORY> [-c <CATEGORY>] ...]

另请参阅 https://developer.android.com/guide/topics/manifest/category-element

编辑

如果BROWSABLE,则目标活动允许 Web 浏览器启动自身,以显示链接(如图像或电子邮件)引用的数据。

见 https://developer.android.com/guide/components/intents-filters

它可能没有任何区别,因为-a是操作,-c是类别。传递操作VIEW和 URL 时,可以假定这将BROWSABLE。最终,这一切都取决于AndroidManifest.xmlintent-filter宣布了什么。当传递像BROWSABLE这样的类别时,仍然可以选择备用应用程序,虽然可用 - 否则它应该是默认值。

最新更新