Android intent-filter pathPattern

weixin_38051598 2019-09-12 12:39:01
我想制作一个可以检测这样的网址的intent-filter: 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" />
...全文
70 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_38052215 2019-09-12
  • 打赏
  • 举报
回复
试试这个, <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" />

433

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧