# ActivityResultContracts.RequestMultiplePermissions

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/result/contract/ActivityResultContracts.kt+class:androidx.activity.result.contract.ActivityResultContracts.RequestMultiplePermissions) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0)

*** ** * ** ***


```
class ActivityResultContracts.RequestMultiplePermissions : ActivityResultContract<Array<String>, Map<String, Boolean>>
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.activity.result.contract.ActivityResultContract](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract)\<[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)\<[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)\>, [Map](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html)\<[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)\>\> ||
|   | ↳ | [androidx.activity.result.contract.ActivityResultContracts.RequestMultiplePermissions](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions) |

*** ** * ** ***

An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to `https://developer.android.com/reference/android/app/Activity.html#requestPermissions(java.lang.String[], int)`

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions#ACTION_REQUEST_PERMISSIONS()` An `https://developer.android.com/reference/android/content/Intent.html` action for making a permission request via a regular `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)` API. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions#EXTRA_PERMISSIONS()` Key for the extra containing all the requested permissions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions#EXTRA_PERMISSION_GRANT_RESULTS()` Key for the extra containing whether permissions were granted. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions#RequestMultiplePermissions()()` |

| ### Public functions |
|---|---|
| `open https://developer.android.com/reference/android/content/Intent.html` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions#createIntent(android.content.Context,kotlin.Array)(context: https://developer.android.com/reference/android/content/Context.html, input: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>)` Create an intent that can be used for `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)`. |
| `open https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract.SynchronousResult<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html>>?` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions#getSynchronousResult(android.content.Context,kotlin.Array)(context: https://developer.android.com/reference/android/content/Context.html, input: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>)` An optional method you can implement that can be used to potentially provide a result in lieu of starting an activity. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html>` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions#parseResult(kotlin.Int,android.content.Intent)(resultCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, intent: https://developer.android.com/reference/android/content/Intent.html?)` Convert result obtained from `https://developer.android.com/reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent)` to `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract`. |

## Constants

### ACTION_REQUEST_PERMISSIONS

```
const val ACTION_REQUEST_PERMISSIONS: String
```

An `https://developer.android.com/reference/android/content/Intent.html` action for making a permission request via a regular `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)` API.

Caller must provide a `String[]` extra `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions#EXTRA_PERMISSIONS()`

Result will be delivered via `https://developer.android.com/reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent)` with `String[]` `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions#EXTRA_PERMISSIONS()` and `int[]` `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions#EXTRA_PERMISSION_GRANT_RESULTS()`, similar to `https://developer.android.com/reference/android/app/Activity.html#onRequestPermissionsResult(int, java.lang.String[], int[])`

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

### EXTRA_PERMISSIONS

```
const val EXTRA_PERMISSIONS: String
```

Key for the extra containing all the requested permissions.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions#ACTION_REQUEST_PERMISSIONS()` |   |

### EXTRA_PERMISSION_GRANT_RESULTS

```
const val EXTRA_PERMISSION_GRANT_RESULTS: String
```

Key for the extra containing whether permissions were granted.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions#ACTION_REQUEST_PERMISSIONS()` |   |

## Public constructors

### RequestMultiplePermissions

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

```
RequestMultiplePermissions()
```

## Public functions

### createIntent

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

```
open fun createIntent(context: Context, input: Array<String>): Intent
```

Create an intent that can be used for `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)`.

### getSynchronousResult

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

```
open fun getSynchronousResult(context: Context, input: Array<String>): ActivityResultContract.SynchronousResult<Map<String, Boolean>>?
```

An optional method you can implement that can be used to potentially provide a result in lieu of starting an activity.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract.SynchronousResult<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html>>?` | the result wrapped in a `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract.SynchronousResult` or `null` if the call should proceed to start an activity. |

### parseResult

```
open fun parseResult(resultCode: Int, intent: Intent?): Map<String, Boolean>
```

Convert result obtained from `https://developer.android.com/reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent)` to `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract`.