# Google Play Data Safety Notes — Illam

Use these notes when completing the **Data safety** and **App content** forms in Google Play Console.

## Summary of Data Flow

Illam operates with **no developer backend server** and **no advertising or third-party analytics SDKs**.

### Data That May Leave the Phone

1. **Direct Wi-Fi Sync Frames** — Household data changes (lists, tasks, trips, meals, spends, staff records) sent **directly to paired family phones on the same home Wi-Fi**. End-to-end encrypted between member devices; never routed through developer servers.
2. **Pairing (PAKE) Messages** — Ephemeral cryptographic key-exchange messages sent on the local Wi-Fi network when adding a family phone to a home.
3. **Encrypted Backups** — Passphrase-encrypted household `.nmbak` snapshots uploaded **only to a storage destination you explicitly configure** (local/USB folder, Nextcloud, WebDAV, S3-compatible bucket, SFTP server, or cloud storage if enabled).
4. **Remote Sync (Experimental — Bring Your Own Firebase, Optional)** — Off by default. If you explicitly turn on Remote Sync and configure your own Firebase project, end-to-end encrypted household update batches are relayed through your own Cloud Firestore project using Anonymous Authentication.
5. **Gmail Invoice Import (Experimental — Bring Your Own Google OAuth, Optional)** — Off by default. If you explicitly turn on Gmail Invoice Import and configure your own Google Cloud Desktop App OAuth client, Illam connects directly over HTTPS from your phone to Google's Gmail API (`gmail.readonly`) to parse order emails and PDF invoices locally on-device into unapproved Draft expenses. OAuth credentials, tokens, and drafts stay encrypted in local secure storage and are never sent to any developer server.
6. **Google ML Kit On-Device Vision Diagnostics (Bill Scanner & QR Scanning)** — Receipt photos and QR images stay 100% on-device. However, `com.google.mlkit:text-recognition` and `mobile_scanner` (ML Kit Barcode Scanning) pull in Google Play Services / `com.google.android.datatransport`, which transmits minimal anonymized SDK operational diagnostics (latency, error codes, model version, and non-user SDK telemetry) to Google per [Google's ML Kit Android Data Disclosure](https://developers.google.com/ml-kit/android-data-disclosure).

## Play Console Questionnaire Guidance

- **Does your app collect or share any of the required user data types?**
  - Declare **Yes** if required to reflect the Google ML Kit SDK operational diagnostics detected by Play's automated SDK scanner:
    - **App info and performance → Diagnostics** (collected automatically by ML Kit SDK for performance/reliability diagnostics; encrypted in transit; user cannot opt out when running the bundled SDK).
    - **Device or other IDs** (only if Google's Play Console ML Kit disclosure table flags an installation/analytics identifier for your exact version — verify against Play Console's SDK warning panel during submission).
  - **User household data, photos, documents, emails, and financial records:** Never sent to the developer or developer-controlled servers.
- **Is all of the user data collected by your app encrypted in transit?** Yes (`https://`, SSH, and authenticated E2EE).
- **Do you provide a way for users to request that their data is deleted?**
  - Link to `https://pvkarthikk.github.io/illam-app/data-deletion.html` (and inside the app: **Profile → Remove from this phone**, leave home, delete home, plus deleting backups/Firestore in user-owned storage).
- **Foreground Services (`FOREGROUND_SERVICE` / `FOREGROUND_SERVICE_SHORT_SERVICE`):**
  - Merged automatically by `workmanager` (`androidx.work:work-runtime:2.11.2`) so short expedited tasks work on Android 14+. Uses `shortService` only (never `dataSync`), which requires no special Play Console FGS type declaration or demo video.

Read Google’s current Data safety help and any automated SDK scan alerts in Play Console before finalizing; when unsure, declare SDK diagnostics accurately.
