我已经为我的活动实施了深度链接。但是当点击链接时,会打开一个 Intent 选择器,询问是从应用程序打开还是从浏览器打开。如何直接从应用程序打开?
此外,当未安装该应用程序时,它不会进入 Playstore。它在浏览器中打开。
以下是我在清单中的代码:
<activity android:name=".activities.VideoNewsDetailActivity"
android:theme="@style/AppThemeActivity"
android:configChanges="orientation|screenSize"
>
<!-- Add this new section to your Activity -->
<intent-filter android:label="@string/videoNewsDetail">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Handle urls starting with "http://www.example.com/products" -->
<data android:scheme="http"
android:host="ddnews.apprikart.in"
android:pathPrefix="/videos" />
<!-- Handle local urls starting with "example://products" -->
<data android:scheme="ddnews.apprikart"
android:host="videos" />
</intent-filter>
</activity>