Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.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 Deep link将取代我的应用程序进入PlayStore_Android_Android Intent_Android Manifest - Fatal编程技术网

在某些设备上,Android Deep link将取代我的应用程序进入PlayStore

在某些设备上,Android Deep link将取代我的应用程序进入PlayStore,android,android-intent,android-manifest,Android,Android Intent,Android Manifest,我已在我的应用程序清单中注册了以下意图筛选器: <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category

我已在我的应用程序清单中注册了以下意图筛选器:

    <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:host="m.mycompany.de"
            android:pathPattern="/app/list"
            android:scheme="http" />
    </intent-filter>
我的意图是

   <data
        android:host="m.mycompany.de"
        android:pathPattern="/app"
        android:scheme="http" />


但这不是一个选项,因为我无法控制我的live应用程序的URL

如我所见,您在错误的方向上使用了数据节的pathPattern参数

据谷歌称:

pathPattern属性指定匹配的完整路径 针对意图对象中的完整路径

因此,您需要使用pathPrefix而不是pathPattern:

pathPrefix属性指定匹配的部分路径 仅针对意图对象中路径的初始部分

或者放弃路径,只使用主机和方案,如下所示:

<data
    android:host="m.mycompany.de"
    android:scheme="http" />


另外,请注意Mimmo Grottoli对原始消息的评论。

您可以使用路径前缀而不是android:pathPattern

<data 
      android:host="m.mycompany.de"
      android:pathPrefix="/app/list"
      android:scheme="http" />

在第二种情况下,当您使用下面的url时

数据标签应该是

<data 
      android:host="m.mycompany.de"
      android:pathPrefix="/list"
      android:scheme="http" />


当你说“PlayStore(我的应用程序页面)”时是打开而不是我的应用'你是说打开了你的网站而不是你的应用,还是真的是指PlayStore应用?@MimmoGrottoli通常会出现一个对话框,询问链接是用PlayStore应用还是用浏览器打开。清单中的'm.mycompany.de'和链接和html页面中的'm.mycompany'是打字错误,对吗?你总是说“m.mycompany.de”?@MimmoGrottoli哦,是的,那是个打字错误。编辑我的问题,谢谢。我不明白的是:你有http作为方案;http方案由浏览器和应用程序管理。因此,提示用户选择必须处理链接的应用程序(浏览器或您的应用程序)是正常的。事实上,你说有些设备提供用浏览器或Play Store打开链接:你是否尝试过清除Play Store应用程序的数据(它是安全的)?
<data 
      android:host="m.mycompany.de"
      android:pathPrefix="/app/list"
      android:scheme="http" />
<data 
      android:host="m.mycompany.de"
      android:pathPrefix="/list"
      android:scheme="http" />