ACTION_VIEW Added in API level 1 public static final String ACTION_VIEW
Activity Action: Display the data to the user. This is the most common action performed on data -- it is the generic action you can use on a piece of data to get the most reasonable thing to occur. For example, when used on a contacts entry it will view the entry; when used on a mailto: URI it will bring up a compose window filled with the information supplied by the URI; when used with a tel: URI it will invoke the dialer.
Input: getData() is URI from which to retrieve data.
Output: nothing.
Constant Value: "android.intent.action.VIEW"
简而言之,可以根据你的数据类型调用到你这个Activity来处理显示。
然后,第二个也是必不可少的是
官方解释:
1 2 3 4 5 6 7
CATEGORY_BROWSABLE Added in API level 1 public static final String CATEGORY_BROWSABLE
Activities that can be safely invoked from a browser must support this category. For example, if the user is viewing a web page or an e-mail and clicks on a link in the text, the Intent generated execute that link will require the BROWSABLE category, so that only activities supporting this category will be considered as possible actions. By supporting this category, you are promising that there is nothing damaging (without user intervention) that can happen by invoking any matching Intent.
Activity supporting ACTION_VIEW is not set as BROWSABLE less... (Ctrl+F1) Inspection info:Ensure the URL is supported by your app, to get installs and traffic to your app from Google Search. Issue id: AppLinkUrlError More info: https://g.co/AppIndexing/AndroidStudio
CATEGORY_DEFAULT Added in API level 1 public static final String CATEGORY_DEFAULT
Set if the activity should be an option for the default action (center press) to perform on a piece of data. Setting this will hide from the user any activities without it set when performing an action on some data. Note that this is normally -not- set in the Intent when initiating an action -- it is for use in intent filters specified in packages.