我想从链接打开我的应用程序,但它不起作用。我有链接:https://www.example.com/stream/0QsmCsh8wJng
如果我删除 android:pathPattern="/stream"那么它就可以工作了。但我需要 pathPattern。
在 list 中我有这个:
<activity
android:name=".activities.StreamActivity"
android:configChanges="orientation|screenSize"
android:parentActivityName=".activities.DashboardActivity"
android:screenOrientation="sensor"
android:theme="@style/AppThemeFullScreen"
android:windowSoftInputMode="stateHidden|adjustResize">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.DashboardActivity"/>
<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="https" android:host="www.example.com" android:pathPattern="/stream" />
</intent-filter>
</activity>
最佳答案
我认为 pathPattern
需要是一个完整 URL ( source ),所以您可能需要类似 android:pathPattern="/stream/. *"
但是,使用 android:pathPrefix="/stream"
会更简单,而且看起来它应该会处理您要尝试做的事情。
关于Android深度链接动态后缀,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36024037/