# BrowserActionItem

Artifact: [androidx.browser:browser](https://developer.android.com/jetpack/androidx/releases/browser) [View Source](https://cs.android.com/search?q=file:androidx/browser/browseractions/BrowserActionItem.java+class:androidx.browser.browseractions.BrowserActionItem) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

*** ** * ** ***


```
class BrowserActionItem
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> Browser Actions are deprecated as of release 1.2.0.

A wrapper class holding custom item of Browser Actions menu. The Bitmap is optional for a BrowserActionItem.

## Summary

| ### Public constructors |
|---|
| `[BrowserActionItem](https://developer.android.com/reference/kotlin/androidx/browser/browseractions/BrowserActionItem#BrowserActionItem(java.lang.String,android.app.PendingIntent))(title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, action: https://developer.android.com/reference/android/app/PendingIntent.html)` **This function is deprecated.** Deprecated in Java |
| `[BrowserActionItem](https://developer.android.com/reference/kotlin/androidx/browser/browseractions/BrowserActionItem#BrowserActionItem(java.lang.String,android.app.PendingIntent,int))( title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, action: https://developer.android.com/reference/android/app/PendingIntent.html, iconId: @https://developer.android.com/reference/kotlin/androidx/annotation/DrawableRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` **This function is deprecated.** Deprecated in Java |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/android/app/PendingIntent.html` | `[getAction](https://developer.android.com/reference/kotlin/androidx/browser/browseractions/BrowserActionItem#getAction())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `[getIconId](https://developer.android.com/reference/kotlin/androidx/browser/browseractions/BrowserActionItem#getIconId())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `[getTitle](https://developer.android.com/reference/kotlin/androidx/browser/browseractions/BrowserActionItem#getTitle())()` **This function is deprecated.** Deprecated in Java |

## Public constructors

### BrowserActionItem

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
[BrowserActionItem](https://developer.android.com/reference/kotlin/androidx/browser/browseractions/BrowserActionItem#BrowserActionItem(java.lang.String,android.app.PendingIntent))(title: String, action: PendingIntent)
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Constructor for BrowserActionItem with only string and action provided.

| Parameters |
|---|---|
| `title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The icon shown for a custom item. |
| `action: https://developer.android.com/reference/android/app/PendingIntent.html` | The string shown for a custom item. |

### BrowserActionItem

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
[BrowserActionItem](https://developer.android.com/reference/kotlin/androidx/browser/browseractions/BrowserActionItem#BrowserActionItem(java.lang.String,android.app.PendingIntent,int))(
    title: String,
    action: PendingIntent,
    iconId: @DrawableRes Int
)
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Constructor for BrowserActionItem with icon, string and action provided.

| Parameters |
|---|---|
| `title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The string shown for a custom item. |
| `action: https://developer.android.com/reference/android/app/PendingIntent.html` | The PendingIntent executed when a custom item is selected |
| `iconId: @https://developer.android.com/reference/kotlin/androidx/annotation/DrawableRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The resource id of the icon shown for a custom item. |

## Public functions

### getAction

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun [getAction](https://developer.android.com/reference/kotlin/androidx/browser/browseractions/BrowserActionItem#getAction())(): PendingIntent
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

| Returns |
|---|---|
| `https://developer.android.com/reference/android/app/PendingIntent.html` | The action of a custom item. |

### getIconId

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun [getIconId](https://developer.android.com/reference/kotlin/androidx/browser/browseractions/BrowserActionItem#getIconId())(): Int
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The resource id of the icon. |

### getTitle

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun [getTitle](https://developer.android.com/reference/kotlin/androidx/browser/browseractions/BrowserActionItem#getTitle())(): String
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The title of a custom item. |