IntegrityTokenRequest.Builder

public static abstract class IntegrityTokenRequest.Builder
extends Object

java.lang.Object
   ↳ com.google.android.play.core.integrity.IntegrityTokenRequest.Builder


Builder for IntegrityTokenRequest.

Summary

Public constructors

Builder()

Public methods

abstract IntegrityTokenRequest build()

Builds a IntegrityTokenRequest.

abstract IntegrityTokenRequest.Builder setCloudProjectNumber(long cloudProjectNumber)

A cloud project number to link to the integrity token.

abstract IntegrityTokenRequest.Builder setNonce(String nonce)

A nonce to bind the integrity token to.

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

build

public abstract IntegrityTokenRequest build ()

Builds a IntegrityTokenRequest.

Returns
IntegrityTokenRequest

setCloudProjectNumber

public abstract IntegrityTokenRequest.Builder setCloudProjectNumber (long cloudProjectNumber)

A cloud project number to link to the integrity token.

This field is required for apps exclusively distributed outside of Google Play and SDKs. For apps distributed on Google Play, the cloud project number is configured in the Play Console and need not be set on the request.

Cloud project number can be found in Project info in your Google Cloud Console for the cloud project where Play Integrity API is enabled.

Calls to decrypt the token on Google's server must be authenticated using the cloud account that was linked to the token in this request.

Parameters
cloudProjectNumber long

Returns
IntegrityTokenRequest.Builder

setNonce

public abstract IntegrityTokenRequest.Builder setNonce (String nonce)

A nonce to bind the integrity token to.

It must be base64 encoded in web-safe no-wrap form.

See details about the nonce requirements and recommendations.

Parameters
nonce String

Returns
IntegrityTokenRequest.Builder