Intent启动Activity,怎么匹配intent-Filter

来源:互联网 发布:notepad格式化php代码 编辑:程序博客网 时间:2024/06/05 05:35


Intent intent = new Intent(Intent.ACTION_VIEW);String type = "video/* ";Uri uri = Uri.parse("http://proiptv.iptv101.com:8000/live/testkorax/070215/2.ts");intent.setDataAndType(uri, type);

Intent intent = new Intent(Intent.ACTION_VIEW);Uri uri = Uri.parse("http://proiptv.iptv101.com:8000/live/testkorax/070215/2.ts");intent.setData(uri);
pathpattern唯一的作用是匹配uri中文件的后缀;在这里改intent-filter没有设置mimetype,那么就直接使用setData即可


0 0
原创粉丝点击