我已經在我的活動中實現了一個深度鏈接。但是當鏈接被點擊時,一個Intent選擇器打開,詢問是從應用程序還是從瀏覽器打開。如何直接從應用程序打開?點擊深度鏈接打開Android中的意圖選擇器
此外,當應用程序未安裝,它不需要存儲。它在瀏覽器中打開。
下面是我在清單代碼:
<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>
這也可以幫助https://開頭developers.google.com/digital-asset-links/v1/getting-started – Tasneem