Dil*_*sh5 13 android android-intent
是否可以在android:host属性上使用通配符?
就像是:
android:host="*.site.com"
android:pathPattern=".*"
android:pathPrefix="/m/"
android:scheme="http" />
Run Code Online (Sandbox Code Playgroud)
甚至
android:host="*.site.*"
android:pathPattern=".*"
android:pathPrefix="/m/"
android:scheme="http" />
Run Code Online (Sandbox Code Playgroud)
Uri*_*kel 16
是.在阅读了IntentFilter.AuthorityEntry.match()的Android代码之后,我可以看到有一种方法可以在主机上放置通配符,但只能匹配主机的开头.规则如下:
这将有效:
android:host="*site.com"
android:pathPattern=".*"
android:scheme="http" />
Run Code Online (Sandbox Code Playgroud)
它将捕获以下链接:
另一方面,下面的那个不起作用:
android:host="*.site.*"
android:pathPattern=".*"
android:scheme="http" />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3491 次 |
| 最近记录: |