Android意图过滤器与assistant中的pathPattern匹配,但不起作用
我正在尝试创建一个应用程序链接来打开我们的应用程序,而不是浏览器 app links Assistant告诉我该模式工作正常,但当我在模拟器或物理设备上尝试时,它不工作:( 过滤器:Android意图过滤器与assistant中的pathPattern匹配,但不起作用,android,deep-linking,applinks,Android,Deep Linking,Applinks,我正在尝试创建一个应用程序链接来打开我们的应用程序,而不是浏览器 app links Assistant告诉我该模式工作正常,但当我在模拟器或物理设备上尝试时,它不工作:( 过滤器: <activity android:name=".activities.AppLinksActivity"> <intent-filter android:autoVerify="true"> <action android:name="an
<activity android:name=".activities.AppLinksActivity">
<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:scheme="http"
android:host="www.emagister.com"
android:pathPattern="/.*-cursos-.*.htm"
/>
</intent-filter>
</activity>
助理留言:
但是,当我在设备上打开它或单击“运行测试”时,我不工作并打开浏览器
如果我将android:pathPattern=“/juridico-master-compliance-officer-controller-juridico-empresarial-cursos-3299291.htm”放在清单中,则上述pathPattern一切正常
我做错了什么
提前感谢!!您的pathPattern
regex似乎不必要地复杂;我不相信这里使用了哪个regex解析器,但如果它不知何故被阻塞了,我也不会感到惊讶
尽量简化,然后再添加元素(但尽量少)。我怀疑pathPattern='.*cursos.*'
仍然会得到同样的结果。您尝试过用https添加另一个数据标记吗?也就是说,谢谢您的回答。Alex。我知道它很旧。我认为OP想要严格限制。这就是OP添加特殊符号和其他详细信息的原因。我们可以添加sup吗regex中的符号签入端口?