# CallbackHandlerRegistry

Artifact: [androidx.remotecallback:remotecallback](https://developer.android.com/jetpack/androidx/releases/remotecallback) [View Source](https://cs.android.com/search?q=file:androidx/remotecallback/CallbackHandlerRegistry.java+class:androidx.remotecallback.CallbackHandlerRegistry) Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/remotecallback#1.0.0-alpha03) Deprecated in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/remotecallback#1.0.0-alpha03)

*** ** * ** ***


```
public class CallbackHandlerRegistry
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> Slice framework has been deprecated, it will not receive any updates moving forward. If you are looking for a framework that handles communication across apps, consider using `https://developer.android.com/reference/android/app/appsearch/AppSearchManager.html`.

The holder for callbacks that are tagged with `https://developer.android.com/reference/androidx/remotecallback/RemoteCallable`. Note: This should only be referenced by generated code, there is no reason to reference this otherwise.

## Summary

| ### Nested types |
|---|
| `public interface https://developer.android.com/reference/androidx/remotecallback/CallbackHandlerRegistry.CallbackHandler<T extends https://developer.android.com/reference/androidx/remotecallback/CallbackReceiver>` **This interface is deprecated.** Deprecated in Java |

| ### Public constructors |
|---|
| `[CallbackHandlerRegistry](https://developer.android.com/reference/androidx/remotecallback/CallbackHandlerRegistry#CallbackHandlerRegistry())()` **This method is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `void` | `<T extends https://developer.android.com/reference/androidx/remotecallback/CallbackReceiver> [invokeCallback](https://developer.android.com/reference/androidx/remotecallback/CallbackHandlerRegistry#invokeCallback(android.content.Context,T,android.content.Intent))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context, T receiver, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Intent.html intent )` **This method is deprecated.** Deprecated in Java |
| `void` | `<T extends https://developer.android.com/reference/androidx/remotecallback/CallbackReceiver> [invokeCallback](https://developer.android.com/reference/androidx/remotecallback/CallbackHandlerRegistry#invokeCallback(android.content.Context,T,android.os.Bundle))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context, T receiver, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/Bundle.html bundle )` **This method is deprecated.** Deprecated in Java |
| `static void` | `<T extends https://developer.android.com/reference/androidx/remotecallback/CallbackReceiver> [registerCallbackHandler](https://developer.android.com/reference/androidx/remotecallback/CallbackHandlerRegistry#registerCallbackHandler(java.lang.Class<T>,java.lang.String,androidx.remotecallback.CallbackHandlerRegistry.CallbackHandler<T>))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/Class.html<T> cls, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html method, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/remotecallback/CallbackHandlerRegistry.CallbackHandler<T> handler )` **This method is deprecated.** Deprecated in Java |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/remotecallback/RemoteCallback` | `[stubToRemoteCallback](https://developer.android.com/reference/androidx/remotecallback/CallbackHandlerRegistry#stubToRemoteCallback(androidx.remotecallback.CallbackReceiver,java.lang.Class<? extends androidx.remotecallback.CallbackReceiver>,android.os.Bundle,java.lang.String))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/remotecallback/CallbackReceiver receiver, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/Class.html<https://developer.android.com/reference/androidx/remotecallback/CallbackReceiver> cls, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/Bundle.html args, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html method )` **This method is deprecated.** Deprecated in Java |

## Public constructors

### CallbackHandlerRegistry

Added in 1.0.0-alpha03 Deprecated in 1.0.0-alpha03

```
public [CallbackHandlerRegistry](https://developer.android.com/reference/androidx/remotecallback/CallbackHandlerRegistry#CallbackHandlerRegistry())()
```

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

## Public methods

### invokeCallback

Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/remotecallback#1.0.0-alpha03) Deprecated in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/remotecallback#1.0.0-alpha03)

```
public void <T extends CallbackReceiver> [invokeCallback](https://developer.android.com/reference/androidx/remotecallback/CallbackHandlerRegistry#invokeCallback(android.content.Context,T,android.content.Intent))(
    @NonNull Context context,
    T receiver,
    @NonNull Intent intent
)
```

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

Trigger a call to a callback using arguments that were generated with `https://developer.android.com/reference/androidx/remotecallback/RemoteCallback#getArgumentBundle()`.

### invokeCallback

Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/remotecallback#1.0.0-alpha03) Deprecated in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/remotecallback#1.0.0-alpha03)

```
public void <T extends CallbackReceiver> [invokeCallback](https://developer.android.com/reference/androidx/remotecallback/CallbackHandlerRegistry#invokeCallback(android.content.Context,T,android.os.Bundle))(
    @NonNull Context context,
    T receiver,
    @NonNull Bundle bundle
)
```

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

Trigger a call to a callback using arguments that were generated with `https://developer.android.com/reference/androidx/remotecallback/RemoteCallback#getArgumentBundle()`.

### registerCallbackHandler

Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/remotecallback#1.0.0-alpha03) Deprecated in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/remotecallback#1.0.0-alpha03)

```
public static void <T extends CallbackReceiver> [registerCallbackHandler](https://developer.android.com/reference/androidx/remotecallback/CallbackHandlerRegistry#registerCallbackHandler(java.lang.Class<T>,java.lang.String,androidx.remotecallback.CallbackHandlerRegistry.CallbackHandler<T>))(
    @NonNull Class<T> cls,
    @NonNull String method,
    @Nullable CallbackHandlerRegistry.CallbackHandler<T> handler
)
```

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

Registers a callback handler to be executed when a given PendingIntent is fired for a `https://developer.android.com/reference/androidx/remotecallback/RemoteCallback`. Note: This should only be called by generated code, there is no reason to reference this otherwise.

### stubToRemoteCallback

Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/remotecallback#1.0.0-alpha03) Deprecated in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/remotecallback#1.0.0-alpha03)

```
public static @Nullable RemoteCallback [stubToRemoteCallback](https://developer.android.com/reference/androidx/remotecallback/CallbackHandlerRegistry#stubToRemoteCallback(androidx.remotecallback.CallbackReceiver,java.lang.Class<? extends androidx.remotecallback.CallbackReceiver>,android.os.Bundle,java.lang.String))(
    @NonNull CallbackReceiver receiver,
    @NonNull Class<CallbackReceiver> cls,
    @NonNull Bundle args,
    @Nullable String method
)
```

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

Turns a callback receiver stub into a remote callback. Note: This should only be called by generated code, there is no reason to reference this otherwise.