# StandardIntegrityManager


`
public


interface
StandardIntegrityManager
`


`


`

|-----------------------------------------------------------------|
| com.google.android.play.core.integrity.StandardIntegrityManager |

<br />

*** ** * ** ***

Manages requests for integrity information.

## Summary

|                                                                                                                                                                                                                                                                                                        ### Nested classes                                                                                                                                                                                                                                                                                                        ||
|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class`     | [StandardIntegrityManager.PrepareIntegrityTokenRequest](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.PrepareIntegrityTokenRequest.html) Request for [StandardIntegrityManager.prepareIntegrityToken(PrepareIntegrityTokenRequest)](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.html#prepareIntegrityToken(com.google.android.play.core.integrity.StandardIntegrityManager.PrepareIntegrityTokenRequest)).                                       |
| ` class`     | [StandardIntegrityManager.StandardIntegrityToken](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.StandardIntegrityToken.html) Response of [StandardIntegrityManager.StandardIntegrityTokenProvider.request(StandardIntegrityTokenRequest)](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.StandardIntegrityTokenProvider.html#request(com.google.android.play.core.integrity.StandardIntegrityManager.StandardIntegrityTokenRequest)).               |
| ` interface` | [StandardIntegrityManager.StandardIntegrityTokenProvider](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.StandardIntegrityTokenProvider.html) Standard integrity token provider.                                                                                                                                                                                                                                                                                                                                                    |
| ` class`     | [StandardIntegrityManager.StandardIntegrityTokenRequest](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.StandardIntegrityTokenRequest.html) Request for [StandardIntegrityManager.StandardIntegrityTokenProvider.request(StandardIntegrityTokenRequest)](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.StandardIntegrityTokenProvider.html#request(com.google.android.play.core.integrity.StandardIntegrityManager.StandardIntegrityTokenRequest)). |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract `[Task](https://developer.google.com/android/reference/com/google/android/gms/tasks/Task.html)`<`[StandardIntegrityManager.StandardIntegrityTokenProvider](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.StandardIntegrityTokenProvider.html)`>` | ` `[prepareIntegrityToken](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.html#prepareIntegrityToken(com.google.android.play.core.integrity.StandardIntegrityManager.PrepareIntegrityTokenRequest))`(`[StandardIntegrityManager.PrepareIntegrityTokenRequest](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.PrepareIntegrityTokenRequest.html)` request) ` Prepares the integrity token and makes it available for requesting via [StandardIntegrityManager.StandardIntegrityTokenProvider](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.StandardIntegrityTokenProvider.html). |
| ` abstract `[Task](https://developer.google.com/android/reference/com/google/android/gms/tasks/Task.html)`<`[Integer](https://developer.android.com/reference/java/lang/Integer.html)`>`                                                                                                                                                    | ` `[showDialog](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.html#showDialog(com.google.android.play.core.integrity.StandardIntegrityManager.StandardIntegrityDialogRequest))`(`[StandardIntegrityManager.StandardIntegrityDialogRequest](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.StandardIntegrityDialogRequest.html)` request) ` Displays a dialog to the user.                                                                                                                                                                                                                                                                                       |

## Public methods

### prepareIntegrityToken

```
public abstract Task<StandardIntegrityManager.StandardIntegrityTokenProvider> prepareIntegrityToken (StandardIntegrityManager.PrepareIntegrityTokenRequest request)
```

Prepares the integrity token and makes it available for requesting via [StandardIntegrityManager.StandardIntegrityTokenProvider](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.StandardIntegrityTokenProvider.html).

You can call this method from time to time in order to refresh the resulting [StandardIntegrityManager.StandardIntegrityTokenProvider](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.StandardIntegrityTokenProvider.html).

Note that this API makes a call to Google servers and hence requires a network connection.

<br />

|                                                         Parameters                                                         ||
|-----------|-----------------------------------------------------------------------------------------------------------------|
| `request` | `StandardIntegrityManager.PrepareIntegrityTokenRequest`: the object to prepare the integrity token with. <br /> |

|                                                                                                                                                                                                                                                                                                                                                                                                                Returns                                                                                                                                                                                                                                                                                                                                                                                                                ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Task](https://developer.google.com/android/reference/com/google/android/gms/tasks/Task.html)`<`[StandardIntegrityManager.StandardIntegrityTokenProvider](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.StandardIntegrityTokenProvider.html)`>` | A [Task](https://developer.google.com/android/reference/com/google/android/gms/tasks/Task.html) that completes once the prepareIntegrityToken flow succeeded or failed. In case of a failure, [StandardIntegrityException](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityException.html) wrapped with a [Task](https://developer.google.com/android/reference/com/google/android/gms/tasks/Task.html) will be thrown. <br /> |

### showDialog

```
public abstract Task<Integer> showDialog (StandardIntegrityDialogRequest request)
```

Displays a dialog to the user.

This method can only be called once per [StandardIntegrityManager.StandardIntegrityDialogRequest.StandardIntegrityResponse](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/StandardIntegrityManager.StandardIntegrityDialogRequest.StandardIntegrityResponse.html).

**Note:** Added in library version 1.5.0.

|                                             Parameters                                             ||
|-----------|-----------------------------------------------------------------------------------------|
| `request` | `IntegrityDialogRequest`: contains the configuration for the dialog to be shown. <br /> |

|                                                                                                                                                                                                                                                     Returns                                                                                                                                                                                                                                                      ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Task](https://developer.google.com/android/reference/com/google/android/gms/tasks/Task.html)`<`[Integer](https://developer.android.com/reference/java/lang/Integer.html)`>` | A [Task](https://developer.google.com/android/reference/com/google/android/gms/tasks/Task.html) that completes with a [IntegrityDialogResponseCode](https://developer.android.com/android/reference/com/google/android/play/core/integrity/model/IntegrityDialogResponseCode) once the showDialog flow succeeded or failed. <br /> |