BrowserActionsIntent
open classBrowserActionsIntent
kotlin.Any | |
↳ | androidx.browser.browseractions.BrowserActionsIntent |
Class holding the Intent
and start bundle for a Browser Actions Activity.
Note: The constants below are public for the browser implementation's benefit. You are strongly encouraged to use BrowserActionsIntent.Builder
.
Summary
Nested classes | |
---|---|
Builder class for opening a Browser Actions context menu. |
Constants | |
---|---|
static String |
Indicates that the user explicitly opted out of Browser Actions in the calling application. |
static String |
Extra that specifies |
static String |
Extra that specifies List used for adding custom items to the Browser Actions menu. |
static String |
Extra that specifies the PendingIntent to be launched when a browser specified menu item is selected. |
static String |
Extra that specifies the type of url for the Browser Actions menu. |
static Int | |
static Int | |
static Int | |
static Int | |
static Int | |
static Int | |
static String |
Extra PendingIntent to be launched when a custom item is selected in the Browser Actions menu. |
static String |
Extra resource id that specifies the icon of a custom item shown in the Browser Actions menu. |
static String |
Extra string that specifies the title of a custom item shown in the Browser Actions menu. |
static Int |
The maximum allowed number of custom items. |
static Int | |
static Int | |
static Int | |
static Int | |
static Int | |
static Int |
Public methods | |
---|---|
open static String? |
getCreatorPackageName(@NonNull intent: Intent) |
open Intent |
Gets the Intent of |
open static String? |
getUntrustedCreatorPackageName(@NonNull intent: Intent) Get the package name of the creator application. |
open static Unit |
launchIntent(@NonNull context: Context, @NonNull intent: Intent) Launch an Intent to open a Browser Actions menu. |
open static Unit |
openBrowserAction(@NonNull context: Context, @NonNull uri: Uri) Construct a BrowserActionsIntent with default settings and launch it to open a Browser Actions menu. |
open static Unit |
openBrowserAction(@NonNull context: Context, @NonNull uri: Uri, type: Int, @NonNull items: ArrayList<BrowserActionItem!>, @NonNull pendingIntent: PendingIntent) Construct a BrowserActionsIntent with custom settings and launch it to open a Browser Actions menu. |
open static MutableList<BrowserActionItem!> |
parseBrowserActionItems(@NonNull bundles: ArrayList<Bundle!>) Gets custom item list for browser action menu. |
Constants
ACTION_BROWSER_ACTIONS_OPEN
static val ACTION_BROWSER_ACTIONS_OPEN: String
Indicates that the user explicitly opted out of Browser Actions in the calling application.
Value: "androidx.browser.browseractions.browser_action_open"
EXTRA_APP_ID
static val EXTRA_APP_ID: String
Extra that specifies PendingIntent
indicating which Application sends the .
Note: The PendingIntent is self-reported and untrusted, sending application can modify it to use PendingIntent from other apps. This would return the package name from the app who creates the PendintIntent.
Value: "androidx.browser.browseractions.APP_ID"
EXTRA_MENU_ITEMS
static val EXTRA_MENU_ITEMS: String
Extra that specifies List used for adding custom items to the Browser Actions menu.
Value: "androidx.browser.browseractions.extra.MENU_ITEMS"
EXTRA_SELECTED_ACTION_PENDING_INTENT
static val EXTRA_SELECTED_ACTION_PENDING_INTENT: String
Extra that specifies the PendingIntent to be launched when a browser specified menu item is selected. The id of the chosen item will be notified through the data of its Intent.
Value: "androidx.browser.browseractions.extra.SELECTED_ACTION_PENDING_INTENT"