我想做一个intent-filter,它可以像这样检测urls:
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" />发布于 2012-12-11 17:56:14
试试这个,
<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" />
<data android:host="*" />
<data android:mimeType="*/*" />
<data android:pathPattern="*.*\\.m3u8" />
</intent-filter>或者,使用以下代码
<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" />
<data android:host="*" />
<data android:pathPattern=".*\\.m3u8" />
</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" />https://stackoverflow.com/questions/13817296
复制相似问题