Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/219.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何从URL打开应用程序?_Android_Android Intent - Fatal编程技术网

Android 如何从URL打开应用程序?

Android 如何从URL打开应用程序?,android,android-intent,Android,Android Intent,我的目标是在用户单击链接时打开我的android应用程序,例如我共享了特定的项目链接(),如果用户已经安装了我的应用程序,则在浏览器上打开它的其他位置打开它 我已经搜索了很多,但它不适合我 <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.c

我的目标是在用户单击链接时打开我的android应用程序,例如我共享了特定的项目链接(),如果用户已经安装了我的应用程序,则在浏览器上打开它的其他位置打开它

我已经搜索了很多,但它不适合我

       <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="http"
                android:host="www.example.com" />
            <data android:scheme="https"
                android:host="www.example.com"/>
        </intent-filter>

我不确定您是否需要在这种情况下设置pathPrefix。此外,操作系统还可以打开用户设置为该模式默认应用的其他首选应用

如果我记得正确,您必须将应用程序与您的网站关联,以便操作系统可以直接绕过用户的选择打开应用程序:


此外,请查看“深度链接”与“应用程序链接”的相关信息。您需要应用程序链接来完成您正在尝试的操作。

这称为。这里有一个关于这个的提示,你可以通过分支io实现深度链接,检查这个@Arthuratout,谢谢,但它显示为提示如何使它成为默认值这回答了你的问题吗?谢天谢地,deep link是我一直在寻找的,但我想自动打开,没有任何选择,现在我得到了“你想打开哪一个我的应用程序或chrome”之类的东西