Guides/App integrity

Google Play / ANDROID

App integrity

Generate the client side of a Play Integrity Classic request, with a clear boundary for backend verification.

Kotlin + JavaViews + Compose callersOfficial SDK docs ↗

Before you start

  • Play Integrity configured for your application and its service requirements.
  • A trusted backend that issues and validates action-bound nonces.
  • A backend verification and enforcement flow; no service credentials belong in the Android app.

Connect the component

01

Select App integrity

The current integration generates Classic nonce requests. Inspect the client source and callback boundary before generating the class.

02

Request a backend nonce

Bind a fresh nonce to the protected operation and user/session on your backend. Pass that server-issued value to the generated client method.

03

Verify off the device

Send the encrypted token to your trusted backend. Verify the token, nonce, request binding and replay conditions before making an authorization decision.

04

Handle failures deliberately

Connect client errors and backend outcomes to your app flow. Test failure cases and enforce your policy on the trusted side of the boundary.

What initialization looks like

These excerpts use the generated component’s public methods. Import your component and merge the calls into the lifecycle and callbacks shown in its generated guide.

// Obtain a fresh, action-bound nonce from your backend.
val integrity = PlayIntegrityClient(applicationContext)

integrity.requestClassicToken(
    serverBoundNonce = serverBoundNonce,
    onToken = { encryptedToken ->
        // Send to your backend for verification.
    },
    onFailure = { error ->
        // Handle the request failure in your app.
    }
)
Initialization excerpt · full component and entry example are available in the plugin.

INTEGRATION NOTES

  • A returned token is not a verified integrity verdict.
  • Standard requests and requestHash preparation are not included in this version.
  • Backend transport, replay prevention and enforcement are application responsibilities.

Keep the official references close.

GooglePlay API maintains the component template. The SDK behavior and service requirements are defined by the provider.