StandardIntegrityManager

public interface StandardIntegrityManager


Manages requests for integrity information.

Summary

Nested types

Request for prepareIntegrityToken.

Builder for PrepareIntegrityTokenRequest.

Request for StandardIntegrityManager#showDialog(StandardIntegrityDialogRequest).

Builder for StandardIntegrityDialogRequest.

Encapsulates the result of a standard integrity check so it can be used to build a StandardIntegrityDialogRequest.

Represents a failed integrity check, containing the StandardIntegrityException.

Represents a successful integrity check, containing the StandardIntegrityToken.

Response of StandardIntegrityTokenProvider#request(StandardIntegrityTokenRequest).

Standard integrity token provider.

Request for StandardIntegrityTokenProvider#request(StandardIntegrityTokenRequest).

Builder for StandardIntegrityTokenRequest.

Public methods

abstract Task<StandardIntegrityManager.StandardIntegrityTokenProvider>

Prepares the integrity token and makes it available for requesting via StandardIntegrityTokenProvider.

abstract Task<Integer>

Displays a dialog to the user.

Public methods

prepareIntegrityToken

abstract Task<StandardIntegrityManager.StandardIntegrityTokenProviderprepareIntegrityToken(
    StandardIntegrityManager.PrepareIntegrityTokenRequest request
)

Prepares the integrity token and makes it available for requesting via StandardIntegrityTokenProvider.

You can call this method from time to time in order to refresh the resulting StandardIntegrityTokenProvider.

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

Parameters
StandardIntegrityManager.PrepareIntegrityTokenRequest request

the object to prepare the integrity token with.

Returns
Task<StandardIntegrityManager.StandardIntegrityTokenProvider>

A Task that completes once the prepareIntegrityToken flow succeeded or failed. In case of a failure, StandardIntegrityException wrapped with a Task will be thrown.

showDialog

abstract Task<IntegershowDialog(
    StandardIntegrityManager.StandardIntegrityDialogRequest request
)

Displays a dialog to the user.

This method can only be called once per StandardIntegrityDialogRequest.StandardIntegrityResponse.

Note: Added in library version 1.5.0.

Since 1.5.0

Parameters
StandardIntegrityManager.StandardIntegrityDialogRequest request

contains the configuration for the dialog to be shown.

Returns
Task<Integer>

A Task that completes with a IntegrityDialogResponseCode once the showDialog flow succeeded or failed.