Intent-filter匹配规则

Action:至少匹配一个  setAction(String)或者new Intent(String action);

category:可以不添加匹配,但是如果添加必须匹配;  addCategory(String categoru)     当没有添加时:系统会设置默认的category:android.intent.category.DEFAULT;

data:至少匹配一个,如果既要匹配data和Type就要使用setDataAndType(Uri data,String type);    不能先setData(uri) 再setType(string type),因为这两个方法会相互清理;

data:分为mimeType和URI

type:mimeType:指媒体类型(image/jpeg;video/*等);data:uri;

原文地址:https://www.cnblogs.com/x-bing/p/6692724.html