繁体   English   中英

“adb shell am start”的“-c android.intent.category.BROWSABLE”有什么用?

[英]What's the use of "-c android.intent.category.BROWSABLE" for "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和 not 有什么不同

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

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

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

它可能没有任何区别,因为-a是操作, -c是类别。 当传递动作VIEW和 URL 时,假设这应该是BROWSABLE是保存的。 最终,这一切都取决于AndroidManifest.xml中的intent-filter声明的内容。 当传递像BROWSABLE这样的类别时,仍然可以选择备用应用程序,但可用 - 否则它应该是默认的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM