单击applink时,我需要选择chrome或我的应用程序

我在下面查看我的网站Google Statement List Generator and Tester
Success! Host XXX grants app deep linking to XXX.但adb shell dumpsys package domain-preferred apps显示
"Status: undefined"有人知道怎么修吗?
Manifest.xml `
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="XXXX.XX"
android:path="/test" />
</intent-filter>`应用程序的状态不是“总是”如何使其正确?
"Status: undefined"发布于 2017-06-02 13:26:42
将此代码放在TextView onClick Listener上。
String urlString="http://www.google.com";
Intent intent=new Intent(Intent.ACTION_VIEW,Uri.parse(urlString));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setPackage("com.android.chrome");
try {
context.startActivity(intent);
} catch (ActivityNotFoundException ex) {
// Chrome browser presumably not installed so allow user to choose instead
intent.setPackage(null);
context.startActivity(intent);}
发布于 2017-06-02 15:38:13
为了避免看到选择器,您需要设置经过验证的应用程序链接。有关说明,请参阅here
https://stackoverflow.com/questions/44321282
复制相似问题