Google.Play.Integrity

Summary

Enumerations

IntegrityErrorCode{
  NoError = 0,
  ApiNotAvailable = 1,
  PlayStoreNotFound = 2,
  NetworkError = 3,
  PlayStoreAccountNotFound = 4,
  AppNotInstalled = 5,
  PlayServicesNotFound = 6,
  AppUidMismatch = 7,
  TooManyRequests = 8,
  CannotBindToService = 9,
  GoogleServerUnavailable = 10,
  NonceTooShort = 11,
  NonceTooLong = 12,
  NonceIsNotBase64 = 13,
  PlayStoreVersionOutdated = 14,
  PlayServicesVersionOutdated = 15,
  InternalError = 100
}
enum
Error codes for Integrity API

Classes

Google.Play.Integrity.IntegrityManager

Manages requests for integrity information.

Google.Play.Integrity.IntegrityTokenRequest

Request for IntegrityManager.RequestIntegrityToken.

Google.Play.Integrity.IntegrityTokenResponse

Response for IntegrityManager.RequestIntegrityToken.

Enumerations

IntegrityErrorCode

 IntegrityErrorCode

Error codes for Integrity API

Properties
ApiNotAvailable

Integrity API is not available.

The Play Store version might be old, or the application is not allowlisted to use this API. Recommended actions:

  • Make sure that an app is allowlisted to use the API.
  • Ask the user to update Play Store.

AppNotInstalled

The calling app is not installed.

Something is wrong (possibly an attack). Non-actionable.

AppUidMismatch

The calling app UID (user id) does not match the one from Package Manager.

Something is wrong (possibly an attack). Non-actionable.

CannotBindToService

Binding to the service in the Play Store has failed.

This can be due to having an old Play Store version installed on the device.

Ask the user to update Play Store.

GoogleServerUnavailable

Unknown internal Google server error.

Retry with an exponential backoff. Consider filing a bug if fails consistently.

InternalError

Unknown internal error.

Retry with an exponential backoff. Consider filing a bug if fails consistently.

NetworkError

No available network is found.

Ask the user to check for a connection.

NoError

No error has occurred.

NonceIsNotBase64

Nonce is not encoded as a base64 web-safe no-wrap string.

Retry with correct nonce format.

NonceTooLong

Nonce length is too long.

The nonce must be less than 500 bytes before base64 encoding.

Retry with a shorter nonce.

NonceTooShort

Nonce length is too short.

The nonce must be a minimum of 16 bytes (before base64 encoding) to allow for better security.

Retry with a longer nonce.

PlayServicesNotFound

Play Services is not available or version is too old.

Ask the user to Install or Update Play Services.

PlayServicesVersionOutdated

Play Services needs to be updated.

Ask the user to update GooglePlay Services.

PlayStoreAccountNotFound

No Play Store account is found on device. Note that the Play Integrity API now supports unauthenticated requests. This error code is used only for older Play Store versions that lack support.

Ask the user to authenticate in Play Store.

PlayStoreNotFound

No Play Store app is found on device or not official version is installed.

Ask the user to install an official and recent version of Play Store.

PlayStoreVersionOutdated

The Play Store needs to be updated.

The Play Store needs to be updated.

TooManyRequests

The calling app is making too many requests to the API and hence is throttled.

Retry with an exponential backoff.