我创建了一个深层链接,但问题是它以“打开或使用其他应用程序”的形式打开一个对话框
我不想让用户决定选择对话框。我想直接打开我的应用程序。这是代码。
<activity android:name=".DeepLinkingActivity">
<intent-filter
android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.google.com"
android:pathPrefix="/help"
android:scheme="https" />
</intent-filter>
</activity>
class DeepLinkingActivity : AppCompatActivity() {
var datas: Uri? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_deep_link)
}
override fun onResume() {
super.onResume()
var intent = intent
datas = intent.data
Log.v("TestingsDatas", "" + datas)
}
}