3
我要让意图过滤器,可以检测到这样的一个网址:
Android的意图过滤pathPattern
http://192.168.0.xx/playlist/_definst_/iphone.smil/list.m3u8?token=XXXXXXX
这个我试过,到目前为止,但没有运气。
<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="*"
android:pathPattern=".*\\*.m3u8.*"
android:scheme="http" />
</intent-filter>
我错过了什么?
需要你的帮助。
这对我有用。希望它也能帮助其他人。
<data android:scheme="http" android:host="*"
android:pathPattern=".*\\.m3u8" />
<data android:scheme="http" android:host="*"
android:pathPattern=".*\\..*\\.m3u8" />
<data android:scheme="http" android:host="*"
android:pathPattern=".*\\..*\\..*\\..m3u8" />
<data android:scheme="http" android:host="*"
android:pathPattern=".*\\..*\\..*\\..*\\.m3u8" />
都尝试,但没有工作。不管怎么说,还是要谢谢你。 –
如果我删除了iphone和smil之间的点(iphone.smil)它的工作原理。我认为这个点与它有关。 –
看看这个:[http://stackoverflow.com/a/12153391/556975]。它显示了如何处理这种情况。 –