Add the Play Integrity library to your app's build.gradle; use version 1.3.0 or higher to access remediation dialogs, and 1.5.0 or higher to access the GET_INTEGRITY and GET_STRONG_INTEGRITY dialog types.
Request an integrity token using StandardIntegrityManager (standard flow) or IntegrityManager (classic flow), then send the token to your server for decryption and verdict evaluation.
On your server, inspect verdict fields such as appLicensingVerdict or deviceRecognitionVerdict to determine which dialog type to show (e.g., GET_LICENSED for an UNLICENSED verdict).
Return the appropriate IntegrityDialogTypeCode to your app client.
On the client, call showDialog(Activity, integrityDialogTypeCode) on the token response object (library 1.3.0+), or use the new StandardIntegrityManager.showDialog(IntegrityDialogRequest) method introduced in library 1.5.0.
After the user closes the dialog, request a fresh integrity token to verify the issue is resolved; for standard requests, warm up the token provider again first.
Known gotchas
Remediation dialog support was introduced in library version 1.3.0; the newer showDialog() method on IntegrityManager and StandardIntegrityManager (for handling client-side exceptions via GET_INTEGRITY and GET_STRONG_INTEGRITY) requires version 1.5.0 — not 1.4.0.
GET_INTEGRITY and GET_STRONG_INTEGRITY dialogs (added in 1.5.0) can fix both verdict issues and remediable client-side exceptions in a single dialog flow; the older showDialog on IntegrityTokenResponse is deprecated as of 1.5.0.
All integrity dialog types can be triggered regardless of the token contents; always verify the token server-side before deciding which dialog to show.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp