1
我有一个引导用户到应用程序的不同部分的多个方案。问题在于,由于所有这些方案的启动都是相同的,所以用户必须选择他想从Android应用程序选择器中去的地方(或者是带有应用程序的底部框被称为)。 我希望我的计划更“精确”,避免强迫用户作出此决定。
CODE
活性1方案触发
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http" android:host="foobar.com" android:pathPrefix="/path/category"/>
<data android:scheme="foobar" android:host="foobar.com" android:pathPrefix="/path/category"/>
</intent-filter>
活性2方案触发
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http" android:host="foobar.com" android:pathPrefix="/path"/>
<data android:scheme="foobar" android:host="foobar.com" android:pathPrefix="/path"/>
</intent-filter>
MY UriSchemes
foobar://foobar.com/path
http://foobar.com/path
foobar://foobar.com/path/category
http://foobar.com/path/category
我使用选项1,因为它看起来更清洁,更versitile。感谢帮助! – JakubW