# TrustedWebActivityCallback

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

*** ** * ** ***


```
public abstract class TrustedWebActivityCallback
```

<br />

*** ** * ** ***

A callback class for browser to get messages from client app. The callbacks should be called via `https://developer.android.com/reference/androidx/browser/trusted/TrustedWebActivityCallbackRemote` on client app.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/browser/trusted/TrustedWebActivityCallback#TrustedWebActivityCallback()()` |

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/browser/trusted/TrustedWebActivityCallback#onExtraCallback(java.lang.String,android.os.Bundle)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html callbackName, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html args)` Free-form callback that may be provided by the implementation. |

## Public constructors

### TrustedWebActivityCallback

Added in 1.3.0

```
public TrustedWebActivityCallback()
```

## Public methods

### onExtraCallback

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

```
public abstract void onExtraCallback(@NonNull String callbackName, @Nullable Bundle args)
```

Free-form callback that may be provided by the implementation.

**Note:** Clients should **never** rely on this callback to be called and/or to have a defined behavior, as it is entirely implementation-defined and not supported.

This can be used by implementations to add extra callbacks, for testing or experimental purposes.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html callbackName` | Name of the extra callback. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html args` | Arguments for the callback |