[英]AppLinks for Android
when I click an applink,I need to chose the chrome or my app 当我点击applink时,我需要选择chrome或我的应用程序
I Check my website Google Statement List Generator and Tester i got below 我查看我的网站Google Statement List Generator和Tester我得到了以下内容
Success! Host XXX grants app deep linking to XXX.
But adb shell dumpsys package domain-preferred-apps shows 但adb shell dumpsys包domain-preferred-apps显示
"Status: undefined"
Manifest.xml ` 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>`
the applinks status is not "always" how to make it right??? applinks状态不是“总是”如何使它正确???
"Status: undefined"
put this code on TextView onClick Listener.. 将此代码放在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);
} }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.