# Google Play Data Safety & Dual-Surface Account Deletion Declaration Guide

> Every Google Play app must submit an accurate Data Safety declaration matching all first-party and transitive third-party SDK network transmissions inside its `.aab` bytecode. Furthermore, any app allowing user account creation (including OAuth or phone OTP) must provide both in-app deletion and a public HTTPS web deletion URL.

- **Canonical URL**: https://staging.gootester.com/declarations/data-safety-and-account-deletion
- **Play Console Location**: `Monitor & improve -> Policy -> App content -> Data safety`
- **Mandatory For**: All Apps (Must declare even if none)
- **Account Requirement**: Personal or Organization

## Step-by-Step Walkthrough
1. **Inspect your release runtime dependency graph before answering Page 1**: Run `./gradlew :app:dependencies --configuration releaseRuntimeClasspath` (or use `/tools/play-store-data-safety-sdk-mapper`) so transitive SDKs like `firebase-installations` or `play-services-ads` aren't omitted.
2. **Declare Collection vs. Sharing, Encryption in Transit, and Account Creation accurately**: Mark `Yes` for data collection whenever any SDK sends crash logs, device IDs, or user records off-device; check TLS encryption in transit; and declare every authentication method used to create accounts.
3. **Host and paste a public HTTPS Web Account Deletion URL (`200 OK`, no login wall)**: Whenever account creation is enabled, deploy a static page (for example `https://example.com/delete-account`) naming your exact Play Store app, explaining web deletion steps, and detailing erased vs. retained data.
4. **Map per-category Required vs. Optional flags and publish in Publishing Overview**: Specify exact purposes (`App functionality`, `Analytics`, `Advertising or marketing`, `Fraud prevention`) for each selected data type, save the CSV-exportable form, and submit via `Publishing overview`.

## Common Rejection Traps
- **Answering 'No, my app does not collect or share any user data' while bundling Crashlytics or AdMob**: Google Play's static DEX scanner detects Firebase, Sentry, and Google Mobile Ads endpoints inside `classes.dex` automatically and blocks releases claiming zero telemetry collection.
- **Assuming 'Continue with Google' OAuth does not count as creating an app account**: Federated OAuth sign-in creates a persistent server-side user record (`uid` + email) in Firebase Auth, Supabase, or Clerk — triggering mandatory in-app AND public web account deletion requirements.
- **Linking a Web Account Deletion page that tells uninstalled users to 'reinstall the app to delete'**: Google Play's web deletion rule exists specifically so users who already uninstalled your APK can request full account and associated data erasure directly from the web.

## How Google Play Cross-Checks DEX Bytecode, Privacy Policy Prose, and Data Safety

Data Safety rejections rarely happen by random chance: Google Play compares three artifacts in unison — the Google Play SDK Index signatures compiled into your `.aab`, the checkboxes selected inside `App content -> Data safety`, and the plain-HTML text served at your Privacy Policy URL (`https://example.com/privacy`). When any one of those three contradicts the others, automated review halts your track rollout.
Pay special attention to the distinction between **Collected** and **Shared**. Sending crash traces to Sentry or Firebase Crashlytics under your processor agreement counts as `Collected` (`Required`, `App functionality` / `Analytics`), whereas bundling an ad network like AdMob (`play-services-ads`) transmits `Device or other IDs`, `Diagnostics`, `App interactions`, and IP-derived `Approximate location` as **both** `Collected` and `Shared`.

## Updating Data Safety During Iterative 14-Day Closed Testing Releases

During an active 14-to-24-day closed testing window on GOOtester ($6 Basic, $12 Standard, or $20 Premium), solo developers routinely add Crashlytics in `versionCode 2` after a human tester spots an edge-case crash or wire Play Billing in `versionCode 3` ahead of Production launch. Always update `App content -> Data safety` **before** rolling out the `.aab` that introduces the new SDK.
Keeping your Data Safety matrix synchronized across every `versionCode` prevents mid-campaign `Publishing overview` holds and ensures your final Production Access submission passes Google Play's compliance inspection cleanly.
