# ActivityCompat.OnRequestPermissionsResultCallback

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/app/ActivityCompat.java+class:androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
public interface ActivityCompat.OnRequestPermissionsResultCallback
```

<br />

Known direct subclasses [FragmentActivity](https://developer.android.com/reference/androidx/fragment/app/FragmentActivity)

|---|---|
| `https://developer.android.com/reference/androidx/fragment/app/FragmentActivity` | Base class for activities that want to use the support-based `https://developer.android.com/reference/androidx/fragment/app/Fragment`. |

Known indirect subclasses [AppCompatActivity](https://developer.android.com/reference/androidx/appcompat/app/AppCompatActivity), [BaseCarAppActivity](https://developer.android.com/reference/androidx/car/app/activity/BaseCarAppActivity), [CarAppActivity](https://developer.android.com/reference/androidx/car/app/activity/CarAppActivity), [LauncherActivity](https://developer.android.com/reference/androidx/car/app/activity/LauncherActivity)

|---|---|
| `https://developer.android.com/reference/androidx/appcompat/app/AppCompatActivity` | Base class for activities that wish to use some of the newer platform features on older Android devices. |
| `https://developer.android.com/reference/androidx/car/app/activity/BaseCarAppActivity` | Core logic for CarAppLibrary Activity interaction with a host. |
| `https://developer.android.com/reference/androidx/car/app/activity/CarAppActivity` | The class representing a car app activity in the main display. |
| `https://developer.android.com/reference/androidx/car/app/activity/LauncherActivity` | This class handles providing the right launcher activity when running native applications and Car App Library applications. |

*** ** * ** ***

This interface is the contract for receiving the results for permission requests.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/core/app/ActivityCompat.OnRequestPermissionsResultCallback#onRequestPermissionsResult(int,java.lang.String[],int[])( int requestCode, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html String[] permissions, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html int[] grantResults )` Callback for the result from requesting permissions. |

## Public methods

### onRequestPermissionsResult

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

```
abstract void onRequestPermissionsResult(
    int requestCode,
    @NonNull String[] permissions,
    @NonNull int[] grantResults
)
```

Callback for the result from requesting permissions. This method is invoked for every call on `https://developer.android.com/reference/androidx/core/app/ActivityCompat#requestPermissions(android.app.Activity,java.lang.String[],int)`.

**Note:** It is possible that the permissions request interaction with the user is interrupted. In this case you will receive empty permissions and results arrays which should be treated as a cancellation.

| Parameters |
|---|---|
| `int requestCode` | The request code passed in `https://developer.android.com/reference/androidx/core/app/ActivityCompat#requestPermissions(android.app.Activity,java.lang.String[],int)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html String[] permissions` | The requested permissions. Never null. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html int[] grantResults` | The grant results for the corresponding permissions which is either `https://developer.android.com/reference/android/content/pm/PackageManager.html#PERMISSION_GRANTED` or `https://developer.android.com/reference/android/content/pm/PackageManager.html#PERMISSION_DENIED`. Never null. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/core/app/ActivityCompat#requestPermissions(android.app.Activity,java.lang.String[],int)` |   |