有什么区别
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和How can I make ADB behave like real deeplink?的用法,但是我找不到使用-c android.intent.category.BROWSABLE和不使用-c android.intent.category.BROWSABLE的区别
发布于 2022-08-29 20:34:21
这是一个category,它的意图可以有很多,并且指定为
[-c <CATEGORY> [-c <CATEGORY>] ...]另见https://developer.android.com/guide/topics/manifest/category-element
编辑
如果目标活动允许由web浏览器启动,则可以显示链接引用的数据,如图像或电子邮件消息。
请参阅https://developer.android.com/guide/components/intents-filters
发布于 2022-08-29 23:51:37
这可能没有什么区别,因为-a是动作,-c是类别。在传递动作VIEW和URL时,可以假定这是BROWSABLE。最终,这都取决于intent-filter在AndroidManifest.xml中声明了什么。在传递像BROWSABLE这样的类别时,人们仍然可以选择替代应用程序,而这是可用的,否则应该是默认的。
https://stackoverflow.com/questions/73529722
复制相似问题