2026-07-30 · Security & Integrity

Play Integrity API — Device & App Integrity Verification Best Practices

1. The Play Integrity API (successor to SafetyNet Attestation) helps verify that your app is running on a genuine Android device with a verified boot state and hasn't been tampered with; 2. Use standard integrity verdicts: DEVICE_INTEGRITY (device passes CTS profile), MEETS_DEVICE_INTEGRITY (stronger check with verified boot), MEETS_BASIC_INTEGRITY (basic system integrity), and MEETS_STRONG_INTEGRITY (requires hardware-backed attestation); 3. Always verify the integrity token on your own backend server — never trust client-side verdicts alone; 4. Use the Play Integrity API to detect rooted devices, emulators, and custom ROMs for apps with anti-fraud or anti-cheat requirements; 5. Implement fallback logic: if the API is temporarily unavailable (e.g., network issues), use a degraded mode instead of blocking all users; 6. The API returns a JWT token — verify the token's signature against Google's public keys, check the 'requestDetails' timestamp is within 5 minutes, and validate the 'appIntegrity' fields; 7. For apps requiring high security (finance, gaming, enterprise), combine Play Integrity with App Check and server-side risk scoring; 8. Test your integrity implementation on multiple device types (Pixel, Samsung, Xiaomi) — some OEMs have different verified boot configurations that may produce unexpected verdicts.

Need expert help? Get a personalized answer from KappS →
← Back to FAQ