Android:Intent.ACTION

Intent.ACTION

To remember the most useful action of intent, I summarize & record it here.

ACTION_MAIN:

  Activity Action: Start as a main entry point, does not expect to receive data.

ACTION_SEARCH:

  Activity Action: Perform a web search.

  You can use method getStringExtra(SearchManager.QUERY) to get the text to search for. If empty, simply enter your search results Activity with the search UI activated.

ACTION_WEB_SEARCH:

  Activity Action: Perform a web search.

    You can use method getStringExtra(SearchManager.QUERY) to get the text to search for. If it is a url starts with http or https, the site will be opened.

    If it is plain text, Google search will be applied.

ACTION_CREATE_SHORTCUT:

  Activity Action: Create a shortcut.

  An Intent representing the shortcut. The intent must contain three extras:SHORTCUT_INTENT(value:Intent),SHORT_NAME(value:String)

and SHORTCUT_ICON(value:Bitmap) or SHORTCUT_ICON_RESOURCE(value:ShortcutIconResource).

原文地址:https://www.cnblogs.com/slowalker/p/3383023.html