# Google Play release checklist Work top to bottom. Items marked **[code]** are already handled in this repository; the rest are things you must do in the Play Console / with your own accounts. ## 1. Identity and signing - [x] Final **application id** chosen: `de.softwareapp_hb.fotodup.finder.free` (`applicationId` in `app/build.gradle.kts`). It can **never be changed after the first release**, so treat it as locked. This is a **new Play listing**, separate from the old paid app at `de.softwareapp_hb.fotodup.finder`; the code package and `namespace` deliberately stay `de.softwareapp_hb.fotodup.finder`, and debug builds append `.debug` → `de.softwareapp_hb.fotodup.finder.free.debug`. - [x] Generate an **upload keystore** (keep it safe; if you lose it you cannot publish updates) — **[code]** done: `fotodup-upload.jks` in the project root (git-ignored, `alias upload`), `CN=Hadrian Burkhardt, L=Potsdam, C=DE`. - [x] Copy `keystore.properties.example` to `keystore.properties` and fill it in. **[code]** done — the file is in place, and the Gradle build picks it up automatically and signs release builds; without it the release APK stays unsigned. - [ ] Enable **Play App Signing** for the **new** app in the Play Console and upload the certificate of your *upload* key (the same upload key can sign both listings): ```bash keytool -exportcert -alias upload -keystore fotodup-upload.jks -rfc > upload_cert.pem ``` Upload key fingerprint (SHA-256), to confirm the right key was registered: `AA:8C:3D:6C:D0:55:46:50:48:ED:04:3E:AF:34:2B:66:B4:13:87:C9:E0:DA:29:70:5A:0D:18:47:08:1A:4C:7A`. Enrolment happens with the first upload of the new listing: Google then holds that app's signing key and this one only signs uploads. - [ ] Store the keystore + passwords in a password manager / secure vault. Back it up. ## 2. Versioning - [x] Set `versionName` (user-visible) **[code]** — `1.1.1` in `app/build.gradle.kts`. - [x] `versionCode` **[code]** — currently **5**. It is the counter Play orders uploads by, and every later upload must be higher. Codes 1–3 were consumed by 1.0.0–1.0.2, and **4** by the 1.1.0 internal-testing build (which crashed on startup, see step 3), so the fixed freemium build takes **5**. ## 3. Build the release artefacts ```bash ./gradlew :app:bundleRelease # -> app/build/outputs/bundle/release/app-release.aab ./gradlew :app:assembleRelease # -> APK for local testing ``` - [x] **Build and record the 1.1.1 artefacts.** The 1.0.2 record is historical (2,940,935 bytes, `sha256 534e5ae9…`). The freemium build adds the ads/UMP/Billing dependencies and the AdMob manifest entry, so its size and hash must be re-measured after real AdMob ids are configured. Verify the release APK reports package `de.softwareapp_hb.fotodup.finder.free`, `versionCode=5 versionName=1.1.1 targetSdk=36` and the permission set in step 5 (including `INTERNET`, `AD_ID` and `BILLING`). The 1.1.0 validation build (`versionCode` 4, test ids) was a 3,655,562-byte APK / 7,680,301-byte AAB, but it **crashed on launch** and must not be reused: R8 removed `androidx.work.impl.WorkDatabase_Impl`'s no-arg constructor, which WorkManager creates reflectively from `androidx.startup.InitializationProvider`. `app/proguard-rules.pro` now keeps it. The current 1.1.1 build (real AdMob ids and `legacyPro.cutoffEpochMs=1792504293000`) is a 3,688,330-byte APK (`sha256 77eaeafa…`) / 7,752,265-byte AAB (`sha256 376439b7…`); `dexdump` confirms the `WorkDatabase_Impl` public no-arg constructor is present. Rebuild and re-measure if the ids or cutoff change. - [ ] **Launch the minified build before uploading.** Do not rely on `assembleDebug`/unit tests: they do not run R8. Install the release APK on a real device (or a temporarily minified debug build side by side) and confirm it gets past the splash screen to the scanner/UMP consent. See `AGENTS.md` §9. - [ ] Upload the **`.aab`** (not the APK) to the Play Console. ⚠️ **Expect a native-debug-symbols warning here, and ignore it.** Play scans the bundle, finds `base/lib//libandroidx.graphics.path.so`, and reports *"This App Bundle contains native code, and you've not uploaded debug symbols"*. It is a recommendation, not an error: it does not block the upload, review or rollout. - That one library (4 ABIs, ~37 KB total) is **not** this project's code — it arrives transitively through `androidx.compose.ui:ui-graphics` → `androidx.graphics:graphics-path:1.0.1`. The project has no `ndk` / `externalNativeBuild` / `jniLibs` config and no native sources at all. - There is nothing to upload: the published `graphics-path-1.0.1.aar` ships **stripped** libs (`symtab=0`, no `.debug_*` sections, no symbol entries anywhere in the AAR), and the commonly-suggested fix does not apply — with `ndk.debugSymbolLevel = "FULL"` the build succeeds but produces no `app/build/outputs/native-debug-symbols/` output and adds nothing to the bundle, because AGP only packages symbols for native code it builds itself. - Excluding the lib (`packaging { jniLibs { excludes += "**/libandroidx.graphics.path.so" } }`) would silence the warning but risks `UnsatisfiedLinkError` inside Compose's path handling, for a 37 KB saving. Not worth it. - What it actually costs: symbolication of frames *inside that Compose helper*. Kotlin/Java crashes are unaffected — the R8 mapping rides inside the bundle (`BUNDLE-METADATA/com.android.tools.build.obfuscation/proguard.map`), so Play deobfuscates them automatically. - [ ] Keep `app/build/outputs/mapping/release/mapping.txt` for every release so you can de-obfuscate crash reports (upload it under *Release > App bundle explorer*). ## 4. Store listing Ready-to-paste copy and the generated graphics live in [docs/STORE_LISTING.md](STORE_LISTING.md) (milestone M10). Everything below is a Console action except the items marked **[code]**. - [ ] **Freemium Console setup — this replaces the old paid-app step.** 1. Create the **new Play app** for `de.softwareapp_hb.fotodup.finder.free` and publish it as **Free** (new apps are free by default). Do **not** change the old paid listing's price; it can stay for existing customers or be unpublished. 2. *Monetise > Products > In-app products* → create **`pro_no_ads`**, type **One-time product**, set the price, **Activate** it. The product id must match `ProProduct.ID` exactly; an inactive product is not returned by Play. 3. AdMob → create/link the Android app, one **Banner** unit and a **UMP message**. Put the ids in `local.properties` (`admob.appId`, `admob.bannerUnitId`) or pass `-Padmob.appId=...`; never commit them. 4. Set `legacyPro.cutoffEpochMs` to the instant of the first freemium release. Installs older than that are grandfathered into Pro; a `0` cutoff disables the migration. Because the new app has a different applicationId, this only works when the old paid app is still installed on the first freemium launch. Tell existing customers to keep the old app installed for that first run, or use a promo code/support flow. 5. Add **license testers**, upload to **internal testing**, and test buy, cancel, pending, restore, reinstall and a second device with the same account. Use a promo code or a license-tester purchase, never a real charge. 6. Update the **Ads**, **Advertising ID** and **Data Safety** answers in step 5. Full steps: [MONETIZATION](MONETIZATION.md); rationale and copy: [STORE_LISTING › App pricing](STORE_LISTING.md#app-pricing). - [ ] App name (≤ 30 chars): "Foto Dup Finder" (15 chars). - [ ] Short description (≤ 80 chars) — two freemium options are drafted and length-checked in STORE_LISTING.md. “Free” is now accurate, but Play's metadata policy still keeps price and promotional wording out of the title, icon and developer name. - [ ] Full description (≤ 4000 chars) — drafted in STORE_LISTING.md. It states the free tier / one-time Pro distinction in the body, not as a promotional gimmick. - [x] **App icon** 512×512 PNG **[code]** — `tools/make-store-assets.sh` renders it from the same vectors as the adaptive icon in `res/drawable/ic_launcher_*`. - [x] **Feature graphic** 1024×500 PNG **[code]** — same script. - [x] **Phone screenshots** (at least 2, up to 8) **[code]** — four are captured and normalised to 1080×2160 in `store-assets/screenshots/phone/` (committed): empty state, scanning (`5353 / 5385`), results (**17 duplicate groups, 54 of 5385 photos, 83.5 MB reclaimable**) and the Options menu. They were shot after a real permission grant and over the generated demo library (`tools/make-demo-photos.py`), so neither the "Photo access needed" banner nor a personal photo is in frame; the demo library is deleted from the test device again once the captures are done. Upload the four, then drag **03-results** to first place — the results screen is the one that sells, and the empty state is the weakest opener. ⚠️ Play rejects a screenshot whose longer side is more than 2× its shorter side, so a 1080×2400 phone capture has to be cropped to 1080×2160; `tools/make-store-screenshots.sh` does exactly that (status and navigation bars only). - [x] **7-inch tablet screenshots** **[code]** — captured on a `Nexus 7 2013` AOSP Android 12 AVD (1200×1920 portrait, `sw600dp`) and normalised to `store-assets/screenshots/tablet-7in/` (committed) with `FORM_FACTOR=tablet-7in ./tools/make-store-screenshots.sh`: the same four screens as the phone set, over the same generated demo library — empty state, scanning (*“Looking for visually similar photos…”* 20 / 22), results (**2 duplicate groups, 16 of 22 photos, 43.7 MB reclaimable**, scanned in 39.7 s) and the Options menu (✓ on *Balanced*). Play asks for **at least 4 screenshots** on tablets, so four is the floor, not the target. 📋 A tablet frame is already inside Play's 2:1 cap, so this form factor deliberately crops **0 px** of system chrome; the tablet captures are the raw screencaps, flattened to 24-bit. - [x] **10-inch tablet screenshots** **[code]** — same run on a `medium_tablet` AOSP Android 12 AVD (1600×2560 portrait, `sw800dp`), normalised into `store-assets/screenshots/tablet-10in/` with `FORM_FACTOR=tablet-10in`: scanning at 20 / 22 and the same **2 groups · 16 of 22 photos · 43.7 MB reclaimable** results screen, scanned in 53.1 s. ⚠️ Both AVDs ran in **pure software emulation**, because this machine exposes no `/dev/kvm` (`-accel off -no-window -gpu swiftshader_indirect`): ≈3 min to boot and 1–12 s per screenshot. `hide_error_dialogs` was turned on and animations off, because under software emulation SystemUI raises an ANR dialog that would otherwise sit in frame. Full recipe: [STORE_LISTING](STORE_LISTING.md) › Screenshots › 7-inch and 10-inch tablets. - [ ] Category: *Tools* (or *Photography* — pick it **before** the tags, because it shapes the *Suggested tags* list). Tags: **max 5, from Play's own list, not typed freely — and only two are honest for this app: *Photography*, plus optionally *Privacy & security*.** Play's taxonomy contains no duplicate/cleanup tag at all, so do not pad the field with *Photo editor* just to fill it; the reasoning is in [STORE_LISTING](STORE_LISTING.md) › Category and tags. ## 5. Policy and compliance - [ ] Host [PRIVACY.md](../PRIVACY.md) at a public URL and paste that URL into the Play Console. **This is mandatory** because the app accesses photos. The contact address in it is final (`softwareapp.hb@gmail.com`), so the file publishes as-is. **Hosting half done (2026-10-14):** the working copy is published to the Gitea instance as [`fishfacegit/foto-duplicate-finder`](https://gitea.softwareapp-hb.de/fishfacegit/foto-duplicate-finder) (`origin` = `ssh://git@gitea-container.incus:2222/fishfacegit/foto-duplicate-finder.git`), so the policy now has a public, login-free URL: - **rendered HTML (use this one in the Console):** `https://gitea.softwareapp-hb.de/fishfacegit/foto-duplicate-finder/src/branch/main/PRIVACY.md` - raw `text/plain` fallback: `https://gitea.softwareapp-hb.de/fishfacegit/foto-duplicate-finder/raw/branch/main/PRIVACY.md` What is left is the Console paste: open the URL in a private window to prove it needs no login, then put it in **App content › Privacy policy**. A dedicated HTML page (the landing page would do) reads better than a file view inside the repo; any static host works the same way, the requirement is only that the URL is public, stable and readable without an account. > **Note on Play's automatic translation:** it translates the *store listing*, not > the hosted policy. If you want the policy in another language, host a translated > copy yourself and link it from the listing. - [ ] Complete the **Data safety** form: - *Does your app collect or share any required user data types?* → **Yes**. - **Device or other IDs** → collected and shared (advertising ID, app set ID, account-related identifiers where applicable). Purpose: **Advertising or marketing**, **Analytics**, **Fraud prevention, security and compliance**. - **App activity** → collected and shared (app launch, taps, video views) for advertising/analytics. - **Diagnostics** → collected and shared (launch time, hang rate, energy usage). - **Location** → **Approximate location**, collected/shared if the Console treats the ads SDK's IP-based estimate as location; the app itself requests no location permission. - **Photos** → **not collected**: read and processed on-device only. - *Is all user data encrypted in transit?* → **Yes** (Google states TLS for the ads SDK; Play Billing is handled by Google). - *Do you provide a way for users to request data deletion?* → The developer holds no server-side data. Uninstalling/clearing app storage removes the local index and Pro cache; users can reset/delete the advertising ID in Android Settings and change consent through **Privacy options** where UMP requires it. - **Purchases** are handled entirely by Google Play. The app never receives payment details; the optional `pro_no_ads` entitlement is cached locally. - The full data-type list and the source are in [MONETIZATION › Play Console declarations](MONETIZATION.md#8-play-console-declarations-and-data-safety). Re-read the form if the AdMob/UMP configuration or the Billing dependency changes. - [x] Confirm the **permission set** the Console will show. **[code]** the freemium build adds the ads and Billing permissions; re-check from the *merged* release manifest rather than the source one after any dependency change, so nothing a library quietly adds slips past: | Declared permission | Why | From | |---|---|---| | `READ_MEDIA_IMAGES` | read the photo library | app | | `READ_MEDIA_VISUAL_USER_SELECTED` | Android 14 partial access | app | | `READ_EXTERNAL_STORAGE` (`maxSdkVersion=32`) | same, on Android ≤ 12 | app | | `WRITE_EXTERNAL_STORAGE` (`maxSdkVersion=29`) | legacy delete on Android 10 only | app | | `FOREGROUND_SERVICE`, `FOREGROUND_SERVICE_DATA_SYNC` | keep a scan alive | app | | `POST_NOTIFICATIONS` | scan-progress notification | app | | `INTERNET`, `ACCESS_NETWORK_STATE` | free-tier ads/consent + Pro purchase | app / Ads SDK | | `com.google.android.gms.permission.AD_ID` | advertising ID | Ads SDK | | `ACCESS_ADSERVICES_AD_ID`, `ACCESS_ADSERVICES_ATTRIBUTION`, `ACCESS_ADSERVICES_TOPICS` | Privacy Sandbox | Ads SDK | | `WAKE_LOCK` | ad rendering | Ads SDK | | `com.android.vending.BILLING` | one-time `pro_no_ads` purchase | Billing SDK | | `…DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION` | framework-generated, not user-facing | AndroidX | `MANAGE_EXTERNAL_STORAGE` must remain **absent**. `INTERNET` is load-bearing for ads and Billing, so the old “no network permission” claim no longer holds; the remaining promise is narrower and still true: the app's own code never uploads photos, thumbnails, hashes or filenames. Audit the merged manifest with: ```bash ./gradlew :app:processReleaseMainManifest grep -A1 ' **Read media images** — Describe why the Android photo picker or other system pickers do > not fully support your app's core functionality, and why your app needs to use the > `READ_MEDIA_IMAGES` permission. Paste — **243** of the 250 characters, pure ASCII so the count cannot drift on paste: > The app needs READ_MEDIA_IMAGES to read every photo, because duplicate detection compares > each photo with every other. A picker exposes only selected files, and a photo's duplicates > are exactly the files it withholds. All hashing is on-device. One sentence carries the whole argument: the reason the permission is needed *is* the reason the picker cannot work. A picker hands over the files the user selected, and duplicates are by definition the files nobody selected — the copies of a picked photo live in the part of the library the picker never exposes. The closing sentence is there because a permission declaration is also a privacy statement, and 25 characters is a cheap way to say it. If you would rather open with the comparison than with the permission, this fits too (**228**): > Finding duplicates requires comparing every photo with every other, so the app must read > the whole library via READ_MEDIA_IMAGES. A picker exposes only selected files, and a > photo's duplicates are exactly the files it withholds. The longer versions below are kept for anywhere that is *not* capped at 250 — Play sometimes follows up by email, and both read well wherever more detail is wanted. **1 689 characters**: > Foto Dup Finder's core functionality is finding duplicate and visually similar photos > across the user's whole photo library, and letting the user delete the copies. Reading the > photo library is that entire operation. > > The Android photo picker cannot support it. The picker only grants access to the items the > user selects in that session, and the duplicates are by definition outside that selection: > the copies of a picked photo are other files, in other folders, that the picker never hands > over. Comparing only the picked items tells the user nothing they did not already know; > finding the groups requires comparing every photo in the library with every other photo. > > The app also needs the whole library to calibrate itself. It estimates the distance > distribution of unrelated photos from the library's own pairwise perceptual-hash distances > and sets the widest similarity threshold whose expected number of accidental matches stays > in budget. Below a few hundred pairs that fit is impossible and the app falls back to a > default; over a hand-picked subset it would be meaningless, because a selection is not a > sample of the library — it is the part the duplicates are not in. > > Nothing is uploaded: photos are read and hashed entirely on the device. The only > network use is the free tier's ads/consent SDK and the optional Pro purchase, and > neither ever receives a photo, thumbnail, hash or filename. Any deletion requires an > explicit selection by the user and always goes through Android's own confirmation > dialog (`MediaStore.createDeleteRequest` / `createTrashRequest`) — never silently — and > the app never requests `MANAGE_EXTERNAL_STORAGE`. Partial access > (`READ_MEDIA_VISUAL_USER_SELECTED`) is declared and supported as a reduced mode for > users who prefer to hand over fewer photos. …and **682 characters**, for a box with less room than that: > Foto Dup Finder's only function is finding duplicate and similar photos across the user's > whole photo library and letting them delete the copies: reading the library is the feature. > The Android photo picker grants access only to the items a user selects, while the > duplicates of a picked photo are precisely the files the picker never hands over — a > selection cannot answer "what is duplicated in my library". The app also calibrates its > similarity threshold from the library's own pairwise distance distribution, which needs the > whole library to mean anything. Photos are processed on-device and never uploaded; the > only network use is ads/consent and the optional Pro purchase, and deletion always goes > through Android's confirmation dialog. Nothing in any of them is aspirational — every claim is a place in the code, so it can be defended if Play comes back with questions: | The answer claims … | … and this is where that is true | |---|---| | the app reads the whole library | `MediaStorePhotoSource.loadPhotos()` queries the image collection with a `null` selection — metadata only, pixels later and lazily | | duplicate detection needs every pair | `DuplicateGrouper` clusters by exact SHA-256 *and* perceptual fingerprints, union-find over the whole scan | | the threshold is fitted per library | `AdaptiveThreshold.choose()` estimates the unrelated-photo distribution from the scan's own pairwise histogram and returns the widest threshold keeping the *expected* number of accidental matches in budget; under `MIN_SAMPLE` = 200 pairs it falls back to the policy ceiling | | a selection cannot stand in for a library | that histogram is built from every pair in the scan — the phone's 5,385-photo library fitted to *pHash ≤ 10 bits* and said so on screen, while the 22-photo tablet library was too small to fit and used its ceiling (`(default)`) | | a constant threshold cannot work | `AdaptiveThreshold` KDoc and README § scan pipeline: the widest pHash threshold with zero false pairs falls from **13 (120 images) to 5 (2 880)** as a library grows | | photos never leave the device | `ScanEngine` / `PhotoHasher` operate on local bytes and the SQLite index; no photo, thumbnail, hash or filename is sent. Only AdMob/UMP/Billing use the network (see [MONETIZATION](MONETIZATION.md)) | | deletion is never silent | `MediaDeleter` → `MediaStore.createDeleteRequest` / `createTrashRequest`; no `MANAGE_EXTERNAL_STORAGE` | | partial access is real, not a gesture | `AppPermissions.MediaAccess.PARTIAL` / `hasPartialAccess()`, with a banner and a prompt to upgrade to full access | Three notes for filling the form in. (1) The declaration asks about `READ_MEDIA_IMAGES` only: `READ_MEDIA_VISUAL_USER_SELECTED` is the *narrow* half of the pair and needs no justification, so do not volunteer it as though it were the broad one. (2) If that screen also asks for a **video**, the recorded foreground-service demo does show a full 5,385-photo library scan and the groups it found, which is the functionality this declaration is about — but it was filmed to answer the foreground-service question, so it is a fallback rather than the intended answer, and a take focused on this question (open → grant → scan → groups) may be asked for. (3) If the declaration were refused, the app already runs in the partial mode it implements (banner + subset scan), so nothing would need rewriting — what would be lost is the promise ("find the duplicates you forgot about"), which is why the answer above is the one to stand behind. - [ ] Declare the **foreground service type**. This is the release-blocking item for the Android 14+ review. **[code]** The manifest already matches what you will declare: | Where | Value | |---|---| | `AndroidManifest.xml` | `` | | `AndroidManifest.xml` | `` | | `ScanService.kt` | `ServiceCompat.startForeground(…, ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC)` | | `ScanService.kt` | `onTimeout()` stops the scan at Android 15's 6-hour `dataSync` cap | The declaration page asks for **four** things per type, not one. Go to **App content › Foreground service permissions**: 1. **Description** of the app functionality using the type: > The app finds duplicate photos on the device. The user starts a scan and may leave > the app while it runs; the foreground service keeps that user-initiated scan alive > and shows its progress. The scan reads the photo library and writes a small local > index of file hashes. The scan service itself performs no network access; ads, > consent and the optional Pro purchase are separate and never receive photo data. 2. **User impact if the task is deferred or interrupted.** A scan is not deferrable work — the user is watching for a result — so there is no WorkManager/JobScheduler fallback: > If the scan were deferred, tapping "Start scan" would appear to do nothing and the > user would have to keep the app open for the work to begin at all. If it were > interrupted, the user would lose the progress of a whole-library comparison and > have to start again. Only reads are involved, so an interruption cannot lose or > corrupt data; the service stops as soon as the scan finishes or is cancelled, and > it is held only for the duration of the scan. 3. **Use case**: **Local processing › Other.** The Console puts three options under *Local processing*, and the other two do not describe this app. *Media transcoding* means converting media into a different format — the app writes no media file at all, it only reads photos to hash and compare them. *Importing, exporting* means moving files in or out of the app — the app's only write is its own private index of file hashes, which no other app ever sees. Play's wording for *Other* is *"Use for specifically user-initiated work and not for regular system or server-initiated tasks"*, which is exactly a scan the user taps *Start scan* for. This is not a cosmetic choice: an inaccurate use case is a misdeclaration, and the description and the video have to back up whichever option is picked — "reads the photo library and writes a small local index of file hashes" only fits *Other*. 4. **A link to a video** demonstrating the feature — *"The video should demonstrate the steps the user needs to take in your app in order to trigger the feature."* **Recorded on the test device** (Android 12 / MIUI, `2a2ae895`) on 2026-10-14 with: ```bash INSTALL=0 WARMUP=0 ./tools/record-fgs-demo.sh 2a2ae895 ``` The output is `store-assets/fgs-demo/foreground-service-demo.mp4` (**committed**, so it is already published; the checkpoint PNG per milestone beside it stays git-ignored). It was checked frame by frame afterwards rather than assumed: the intro at 0 s, the scan starting (*"Comparing file signatures… 91/102"*, 8 s), the shade held open for ~6 s with the live notification (*"Finding duplicate photos / Looking for visually similar photos… / CANCEL"*, 13–18 s) while the scan kept running behind it, and the finished results (*17 duplicate groups · 54 of 5,385 photos*) at the end. **The link to paste** is the file's page in Gitea — what the repository's own *view* of the file opens, and what plays it: ``` https://gitea.softwareapp-hb.de/fishfacegit/foto-duplicate-finder/src/branch/main/store-assets/fgs-demo/foreground-service-demo.mp4 ``` ⚠️ **Not the `/raw/` URL**, even though that is the file itself. Gitea answers raw responses with `Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; sandbox` — a deliberate guard against raw HTML and SVG — and that blocks the media load of a document that navigates straight to a video: the tab stays blank with no error, which is exactly how this behaved in a browser. The same URL is fine as a *subresource*: the page above embeds `