# HandleAppFunctionRequestAdapter

Artifact: [androidx.appfunctions:appfunctions](https://developer.android.com/jetpack/androidx/releases/appfunctions) [View Source](https://cs.android.com/search?q=file:androidx/appfunctions/HandleAppFunctionRequestAdapter.kt+class:androidx.appfunctions.HandleAppFunctionRequestAdapter) Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

*** ** * ** ***


```
@ExperimentalAppFunctionsApi
public interface HandleAppFunctionRequestAdapter<T extends Object>
```

<br />

*** ** * ** ***

An adapter for an interface annotated with `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSignature`.

Implementations of this interface are generated by the AppFunction compiler for interfaces annotated with `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSignature`, and should not be manually implemented.

Instances of this adapter can be obtained via `https://developer.android.com/reference/androidx/appfunctions/AppFunctionManager#getHandleAppFunctionRequestAdapter(java.lang.Class)`.

| Parameters |
|---|---|
| `<T extends https://developer.android.com/reference/java/lang/Object.html>` | The type of the interface annotated with `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSignature`. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSignature` |   |
| `https://developer.android.com/reference/androidx/appfunctions/AppFunctionManager#getHandleAppFunctionRequestAdapter(java.lang.Class)` |   |

## Summary

| ### Public methods |
|---|---|
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/HandleAppFunctionRequest` | `https://developer.android.com/reference/androidx/appfunctions/HandleAppFunctionRequestAdapter#adapt(kotlin.Any)(@https://developer.android.com/reference/androidx/annotation/NonNull T instance)` Creates a `https://developer.android.com/reference/androidx/appfunctions/HandleAppFunctionRequest` for the given `https://developer.android.com/reference/androidx/appfunctions/HandleAppFunctionRequestAdapter#adapt(kotlin.Any)`. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appfunctions/HandleAppFunctionRequestAdapter#getFunctionIdentifier()()` The unique identifier of the app function. |

## Public methods

### adapt

Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

```
abstract @NonNull HandleAppFunctionRequest adapt(@NonNull T instance)
```

Creates a `https://developer.android.com/reference/androidx/appfunctions/HandleAppFunctionRequest` for the given `https://developer.android.com/reference/androidx/appfunctions/HandleAppFunctionRequestAdapter#adapt(kotlin.Any)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull T instance` | The implementation of the app function interface. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/HandleAppFunctionRequest` | The `https://developer.android.com/reference/androidx/appfunctions/HandleAppFunctionRequest` wrapping the `https://developer.android.com/reference/androidx/appfunctions/HandleAppFunctionRequestAdapter#adapt(kotlin.Any)`. |

### getFunctionIdentifier

Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

```
abstract @NonNull String getFunctionIdentifier()
```

The unique identifier of the app function.