BrowserActionsIntent.Builder

Added in 1.2.0
Deprecated in 1.2.0

class BrowserActionsIntent.Builder


Builder class for opening a Browser Actions context menu.

Summary

Public constructors

Builder(context: Context, uri: Uri)

Constructs a BrowserActionsIntent.Builder object associated with default setting for a selected url.

Public functions

BrowserActionsIntent

Combines all the options that have been set and returns a new object.

BrowserActionsIntent.Builder

Sets the custom items list.

BrowserActionsIntent.Builder

Sets the custom items list.

BrowserActionsIntent.Builder
setOnItemSelectedAction(onItemSelectedPendingIntent: PendingIntent)

Set the PendingIntent to be launched when a a browser specified menu item is selected.

BrowserActionsIntent.Builder
setUrlType(type: Int)

Sets the type of Browser Actions context menu.

Public constructors

Builder

Added in 1.2.0
Deprecated in 1.2.0
Builder(context: Context, uri: Uri)

Constructs a BrowserActionsIntent.Builder object associated with default setting for a selected url.

Parameters
context: Context

The context requesting the Browser Actions context menu.

uri: Uri

The selected url for Browser Actions menu.

Public functions

build

Added in 1.2.0
Deprecated in 1.2.0
fun build(): BrowserActionsIntent

Combines all the options that have been set and returns a new object.

setCustomItems

fun setCustomItems(items: Array<BrowserActionItem!>): BrowserActionsIntent.Builder

Sets the custom items list. Only maximum MAX_CUSTOM_ITEMS custom items are allowed, otherwise throws an IllegalStateException.

Parameters
items: Array<BrowserActionItem!>

The varargs of BrowserActionItem for custom items.

setCustomItems

Added in 1.2.0
Deprecated in 1.2.0
fun setCustomItems(items: ArrayList<BrowserActionItem!>): BrowserActionsIntent.Builder

Sets the custom items list. Only maximum MAX_CUSTOM_ITEMS custom items are allowed, otherwise throws an IllegalStateException.

Parameters
items: ArrayList<BrowserActionItem!>

The list of BrowserActionItem for custom items.

setOnItemSelectedAction

Added in 1.2.0
Deprecated in 1.2.0
fun setOnItemSelectedAction(onItemSelectedPendingIntent: PendingIntent): BrowserActionsIntent.Builder

Set the PendingIntent to be launched when a a browser specified menu item is selected.

Parameters
onItemSelectedPendingIntent: PendingIntent

The PendingIntent to be launched.

setUrlType

Added in 1.2.0
Deprecated in 1.2.0
fun setUrlType(type: Int): BrowserActionsIntent.Builder

Sets the type of Browser Actions context menu.

Parameters
type: Int

The type of url.