# RemoteCallback

Artifact: [androidx.remotecallback:remotecallback](https://developer.android.com/jetpack/androidx/releases/remotecallback) [View Source](https://cs.android.com/search?q=file:androidx/remotecallback/RemoteCallback.java+class:androidx.remotecallback.RemoteCallback) 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)

*** ** * ** ***


```
class RemoteCallback
```

<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`.

An instance of a callback to a specific class/method with a specific set of arguments. Can only be obtained from a `https://developer.android.com/reference/kotlin/androidx/remotecallback/CallbackReceiver`.

## Summary

| ### Constants |
|---|---|
| `const https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback!` | `https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#LOCAL()` **This property is deprecated.** Deprecated in Java |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#TYPE_PROVIDER() = 1` **This property is deprecated.** Deprecated in Java |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#TYPE_RECEIVER() = 0` **This property is deprecated.** Deprecated in Java |

| ### Public functions |
|---|---|
| `java-static T!` | `<T : https://developer.android.com/reference/kotlin/androidx/remotecallback/CallbackReceiver?> [create](https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#create(java.lang.Class<T>,android.content.Context))(cls: https://developer.android.com/reference/java/lang/Class.html<T!>!, context: https://developer.android.com/reference/android/content/Context.html!)` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/android/os/Bundle.html!` | `[getArgumentBundle](https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#getArgumentBundle())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `[getMethodName](https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#getMethodName())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `[getReceiverClass](https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#getReceiverClass())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `[getType](https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#getType())()` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/android/app/PendingIntent.html!` | `[toPendingIntent](https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#toPendingIntent())()` **This function is deprecated.** Deprecated in Java |

## Constants

### LOCAL

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)

```
const val LOCAL: RemoteCallback!
```

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

Constant value that actual implementations of `https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallable` should return.

### TYPE_PROVIDER

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)

```
const val TYPE_PROVIDER = 1: Int
```

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

Constant indicating this callback will be triggered on a `https://developer.android.com/reference/android/content/ContentProvider.html`.

### TYPE_RECEIVER

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)

```
const val TYPE_RECEIVER = 0: Int
```

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

Constant indicating this callback will be triggered on a `https://developer.android.com/reference/android/content/BroadcastReceiver.html`.

## Public functions

### create

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)

```
java-static fun <T : CallbackReceiver?> [create](https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#create(java.lang.Class<T>,android.content.Context))(cls: Class<T!>!, context: Context!): T!
```

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

Static version of `https://developer.android.com/reference/kotlin/androidx/remotecallback/CallbackReceiver#createRemoteCallback(android.content.Context)`.

### getArgumentBundle

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)

```
fun [getArgumentBundle](https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#getArgumentBundle())(): Bundle!
```

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

Gets the bundle of arguments that will be used to trigger the method.

### getMethodName

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)

```
fun [getMethodName](https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#getMethodName())(): String!
```

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

Gets the name of the method this callback will call.

### getReceiverClass

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)

```
fun [getReceiverClass](https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#getReceiverClass())(): String
```

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

Gets the class the callback will be called on.

### getType

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)

```
fun [getType](https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#getType())(): Int
```

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

Get the type of the receiver of this callback.

### toPendingIntent

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)

```
fun [toPendingIntent](https://developer.android.com/reference/kotlin/androidx/remotecallback/RemoteCallback#toPendingIntent())(): PendingIntent!
```

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

Create a `https://developer.android.com/reference/android/app/PendingIntent.html` that will trigger this callback.