feat: turn the paid app into a freemium app with ads and Pro

- add a single AdMob anchored adaptive banner to the free tier
- add UMP consent and a privacy-options entry point before ads load
- add the one-time Play Billing product `pro_no_ads`; Pro removes the banner
  and nothing else, every scan/selection/deletion feature stays free
- cache the entitlement locally, handle pending purchases, acknowledge and
  retry acknowledgement, and restore from Play on resume
- grandfather paid installs through `legacyPro.cutoffEpochMs`, checking both
  the new package and the old paid package declared in <queries>
- move the Play identity to `de.softwareapp_hb.fotodup.finder.free` while
  keeping the Kotlin namespace `de.softwareapp_hb.fotodup.finder`
- add a debug-only Pro toggle and focused monetisation tests
- add AGENTS.md, docs/codemap.md, docs/codemap.mmd and docs/MONETIZATION.md
- update README, PRIVACY, CHANGELOG, ROADMAP, store copy and the Play checklist
- bump to 1.1.0 / versionCode 4
This commit is contained in:
2026-10-20 09:28:29 +02:00
parent 3afa7d777d
commit 22091dd808
36 changed files with 3268 additions and 295 deletions
+174 -133
View File
@@ -5,34 +5,35 @@ 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`
- [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. `namespace` and the Kotlin package of
the same name are aligned with it; debug builds append `.debug`.
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** in the Play Console and upload the certificate of
your *upload* key:
- [ ] 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: Google then holds the app signing key and this
one only signs uploads.
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.0.2` in `app/build.gradle.kts`.
- [x] `versionCode` **[code]** — currently **3**. It is the counter Play orders uploads by, and
every later upload must be higher. **2 is already used**: Play rejects re-uploading the 1.0.1
bundle with *"Version code 2 has already been used. Try another version code."* — 1 was the
1.0.0 build, so 1.0.2 takes **3**.
- [x] Set `versionName` (user-visible) **[code]** — `1.1.0` in `app/build.gradle.kts`.
- [x] `versionCode` **[code]** — currently **4**. 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, so the
freemium build takes **4**.
## 3. Build the release artefacts
@@ -41,14 +42,17 @@ the rest are things you must do in the Play Console / with your own accounts.
./gradlew :app:assembleRelease # -> APK for local testing
```
- [x] **[code]** verified 2026-10-18: `bundleRelease` and `assembleRelease` both succeed.
`app/build/outputs/bundle/release/app-release.aab` is 2,940,935 bytes
(`sha256 534e5ae9c9a62ca13c93dd2da52d8228ec72aed14a1fe830f6e0def17b22e9f5`) and is signed with
the upload key. The release APK reports `versionCode=3 versionName=1.0.2 targetSdk=36` and
exactly the permission set listed in step 5 — **no `INTERNET`**, so "nothing leaves the
device" holds in the shipped artefact, not just in the source manifest.
(The 1.0.1 build is the one Play recorded as `versionCode` 2: 2,944,100 bytes,
`sha256 f8e6a29a…`.)
- [ ] **Build and record the 1.1.0 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=4 versionName=1.1.0
targetSdk=36` and the permission set in step 5 (including `INTERNET`, `AD_ID` and
`BILLING`).
Local validation with the default test ids (2026-10-20): APK 3,655,562 bytes,
`sha256 931d2b21…`; signed AAB 7,680,301 bytes, `sha256 03abb548…`.
Re-measure both after setting the real ids/cutoff — the ids change the manifest and
therefore the artefacts.
- [ ] 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/<abi>/libandroidx.graphics.path.so`, and reports *"This App Bundle contains native
@@ -79,47 +83,34 @@ 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]**.
- [ ] ⚠️ **Confirm App pricing is set to paid before rolling out — it is the one irreversible
decision.** Play, *Set up your app's prices*: *"You can change your app from paid to free. Once your app has
been offered for free, the app can't be changed to paid. If you want to charge for the app, you
need to create a new app with a new package name and set a price."* **`versionCode` 2 (1.0.1)
has already been uploaded and consumed**, so check *Products > App pricing* before this
rollout: if it still offers **Make your app paid**, do it now — once the app is offered for
free that option is gone for good. In the Console:
1. **Set up a payments profile** with your tax rates (Play asks the first time you set a price).
2. **Products > App pricing** → *"Your app is"* → **Make your app paid**, and enter the base price
**€2.99** (one-time). Leave *"Default price includes tax"* off unless €2.99 is meant to be the
final gross price in the EU — off, the €2.99 is a **net** figure and the buyer is charged the
gross price: **€3.56** in Germany (19% VAT), **€3.59** in a 20% market such as Austria or
France. **Verified live after publishing: the listing reads €3.59** — the Console shows the
price you typed, the storefront shows the price the buyer pays, and Play prices the page for
the country of the viewing account rather than the country you are sitting in. What each
setting does to the sticker and to your payout:
[STORE_LISTING › What the buyer actually pays](STORE_LISTING.md#what-the-buyer-actually-pays).
3. Check the **local prices** Play derives for each country — a country with no price is a
country where the app is unavailable.
4. [ ] **Launch sale: 50% off (€1.49) for 14 days.** A sale can only be created *after* the app is
published (*App pricing > Sales > Create sale*), it can be **live for 1–14 days at most**, and
**30 days must pass between one sale ending and the next starting** — so this is a single
deadline-driven window, not a permanently lower launch price. Percentage discounts must be
between 10% and 100%. The original price is struck through everywhere except in 12 EU member
states and the UK (Germany does show it) — and that crossed-out figure is the **gross** price.
**Verified live:** the sale reads **€1.79** (€1.77 in Germany), the same VAT gross-up as the
base price: 1.49 × 1.20 and 1.49 × 1.19.
5. [ ] **Test the paid listing end to end**: install your own copy through a **promo code**
rather than a real purchase. A giveaway code is the only trial mechanism a paid app has, and
it doubles as the check that a buyer really does receive a working app.
**[code]** nothing to build: no Billing dependency, no `com.android.vending.BILLING` in the
merged manifest. Rationale, the fee arithmetic and the sale rules:
[STORE_LISTING](STORE_LISTING.md) › App pricing.
- [ ] **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 options are drafted and length-checked in
STORE_LISTING.md (69 and 65 chars). **Neither says "free"**: the app is paid, so the claim would
be false, and Play's metadata policy keeps price and promotional wording out of the title,
icon and developer name.
- [ ] Full description (≤ 4000 chars) — drafted and length-checked in STORE_LISTING.md (2 426 chars,
so there is room to grow). The one price line ("Pay once, then own it…") sits in the body for
the same policy reason.
- [ ] 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.
@@ -183,23 +174,31 @@ action except the items marked **[code]**.
> 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?* → **No**.
- Data types accessed: **Photos** — processed on-device only, not collected.
- *Is all user data encrypted in transit?* → N/A (no transmission).
- *Do you provide a way for users to request data deletion?* → Uninstalling
removes all app data.
- The **paid** model changes none of the above: the purchase happens in the Play Store app, not in
this one. Play's own guidance is that using a payment service such as *"Google Play's billing
system"* to complete transactions does **not** require declaring the data that service collects
in connection with its processing — and this app contains no payment code at all, so it receives
nothing either way. Re-read that if a Billing dependency is ever added
(step 9); the app's own answers would still be "no", but the *purchase handling* would move
into the app and the answers would need a fresh look.
- [x] Confirm the **permission set** the Console will show. **[code]** done 2026-10-13: `aapt2 dump
badging` on the release APK reports exactly the table below (plus
`…DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION`) — and **no `INTERNET`**. Re-check from the
*merged* release manifest rather than the source one after any dependency change, so nothing
a library quietly adds slips past:
- *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 |
|---|---|---|
@@ -209,17 +208,23 @@ action except the items marked **[code]**.
| `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 |
Deliberately **absent**: `INTERNET` and `MANAGE_EXTERNAL_STORAGE`. Both are
load-bearing for the "nothing leaves the device" claim, so re-check after any new
dependency:
`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 '<uses-permission' \
app/build/intermediates/merged_manifests/release/processReleaseManifest/AndroidManifest.xml \
| grep -oE 'android.permission.[A-Z_]+' | sort -u
| grep -oE '[A-Za-z0-9_.]*permission\.[A-Z_]+|com\.android\.vending\.BILLING' | sort -u
```
(Match `<uses-permission` only. A bare `android.permission.` grep also picks up
@@ -270,12 +275,14 @@ action except the items marked **[code]**.
> 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: the app declares no INTERNET permission and all hashing happens on the
> device. Photos are only read. 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.
> 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:
@@ -285,8 +292,9 @@ action except the items marked **[code]**.
> 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. Nothing is uploaded (the app has no INTERNET permission)
> and deletion always goes through Android's confirmation dialog.
> 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:
@@ -298,7 +306,7 @@ action except the items marked **[code]**.
| 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 |
| nothing leaves the device | no `INTERNET` in the merged release manifest — the `aapt2` audit in the item above |
| 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 |
@@ -333,7 +341,8 @@ action except the items marked **[code]**.
> 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. It performs no network access and transfers no data.
> 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:
@@ -451,29 +460,27 @@ action except the items marked **[code]**.
typically rated Everyone / 3+).
- [ ] **App access** → *All functionality is available without special access*: no login, no
account, nothing gated.
- [ ] **Ads** → *No, my app does not contain ads* (and no ad SDK in
`gradle/libs.versions.toml` to contradict the answer).
- [ ] **Advertising ID** → *No, my app does not use advertising ID.* The question adds "This
includes any SDKs that your app imports that use advertising ID", so the answer has to come
from the dependency graph rather than from the source: `play-services-ads-identifier` is what
provides the ID and it merges `AD_ID` into the manifest on its own, so adding any ad or
analytics SDK would flip this answer to *Yes* without one line of app code changing. Audited
2026-10-14 against the shipped artefacts rather than against intentions:
- [ ] **Ads** → **Yes, my app contains ads.** The free tier shows one AdMob banner;
Pro removes it. Play asks whether the app *contains* ads, not whether every user
sees them, so the answer is Yes.
- [ ] **Advertising ID** → **Yes, my app uses advertising ID.** The question adds "This
includes any SDKs that your app imports that use advertising ID"; the Google Mobile
Ads SDK merges `AD_ID` and the Privacy Sandbox permissions, and Play Billing merges
`BILLING`. Audited against the merged release manifest, not against intentions:
| Check | Command | Result |
| Check | Command | Expected |
|---|---|---|
| no advertising/analytics SDK, direct **or transitive** | `./gradlew --offline -q :app:dependencies --configuration releaseRuntimeClasspath \| grep -iE 'gms\|firebase\|ads\|billing\|play-services'` | no output |
| no `AD_ID` and no Privacy Sandbox permission in the release APK | `aapt2 dump badging app/build/outputs/apk/release/app-release.apk \| grep -i permission` | exactly the audit table above — 7 requested, plus the framework's `…DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION` |
| the same for the **`.aab`**, which is the artefact Play scans | `unzip -p app/build/outputs/bundle/release/app-release.aab base/manifest/AndroidManifest.xml \| strings \| grep -x 'AD_ID'` | 0 hits |
| no Play Services classes in the shipped code | `unzip -p app/build/outputs/apk/release/app-release.apk classes.dex \| grep -a -c 'com/google/android/gms'` | 0 |
| nothing could be sent even if an ID were read | the permission audit above | no `INTERNET` |
| ads + Billing dependencies, direct or transitive | `./gradlew -q :app:dependencies --configuration releaseRuntimeClasspath \| grep -iE 'play-services-ads\|billing\|user-messaging'` | `play-services-ads`, `billing`, `user-messaging-platform` |
| `AD_ID` and Privacy Sandbox permissions in the release APK | `aapt2 dump badging app/build/outputs/apk/release/app-release.apk \| grep -i permission` | the permission table above, including `AD_ID` and `ACCESS_ADSERVICES_*` |
| the same for the **`.aab`** Play scans | `unzip -p app/build/outputs/bundle/release/app-release.aab base/manifest/AndroidManifest.xml \| strings \| grep -E 'AD_ID\|BILLING'` | both present |
| Play Services classes in the shipped code | `unzip -p app/build/outputs/apk/release/app-release.apk classes.dex \| grep -a -c 'com/google/android/gms'` | greater than 0 (ads SDK) |
| network is possible | the permission audit above | `INTERNET` present |
This is the machine-checked version of what [PRIVACY.md](../PRIVACY.md) promises in words
("does not collect … advertising identifiers", "does not contain advertising SDKs or
third-party trackers"), so re-run the first two rows after **any** dependency change —
including one that looks unrelated. This is the declaration a stray library can answer
wrongly on the app's behalf, and the *Data safety* form's *Device or other IDs* answer is
*No* for the same reason.
This is the machine-checked version of what [PRIVACY.md](../PRIVACY.md) now says:
photos are processed on-device, while Google Mobile Ads collects/shared ad data for
advertising, analytics and fraud prevention. Re-run the audit after **any**
dependency change. The *Data safety* form's *Device or other IDs* answer is
**Yes** for the same reason.
- [ ] Select the target audience (not designed for children).
- [ ] Answer the remaining *App content* declarations **No** / not applicable: news app,
@@ -498,13 +505,25 @@ action except the items marked **[code]**.
- [x] Test with a library of several thousand photos to sanity-check scan time. **[code]** done on
the test device: the 5,363-photo library scans in **20.2 s cold / 11.0 s warm**, and the
screenshot run over 5,385 photos finished in **11.1 s** (6 unreadable files skipped).
- [x] **Freemium build on the real phone** (Xiaomi M2101K7AG, Android 12 / API 31):
**5,373 photos, 19 groups, 47 photos involved, 40.1 MB reclaimable, 25.5 s**
(signatures 2.2 s · exact 42 ms · perceptual 22.1 s), pHash cut fitted to ≤ 10 bits,
6 unreadable. The AdMob **adaptive test banner loaded**, the free/Pro toggle removed
it, the Pro sheet rendered, and **Buy Pro** showed the expected
“purchases unavailable” message because `pro_no_ads` is not active in the Console yet.
No app-level fatal; the only logcat fatal was the separate `uiautomator` dump tool.
**Warm retest on the same phone:** the cached index brings the same **5,373-photo**
library down to **3.0 s** (signatures 675 ms · exact 4 ms · perceptual 939 ms),
still **19 groups / 47 photos / 40.1 MB**. Buy Pro still reports “purchases
unavailable” because this debug build was sideloaded and `pro_no_ads` is not active
on the internal track yet; that is the expected gate, not a crash.
- [ ] Verify no crashes in *Play Console > Quality > Android vitals* after rollout.
## 7. Release notes ("What's new") and rollout
⚠️ **Which block applies:** `versionCode` **2** (1.0.1) is already in Play — its upload is what
consumed the code — so the next upload is **1.0.2 / `versionCode` 3** and takes the 1.0.2 block
below. The initial-release block is kept for the record; it was the 1.0.1 upload.
⚠️ **Which block applies:** `versionCode` **4** (1.1.0) is the freemium build, so paste the
1.1.0 block below. The 1.0.2 and initial-release blocks are kept for the record and are
historical — the initial block still says “no ads”, which was true only of the paid build.
Release notes are **not stored in this repo** — they are typed into the Play Console
@@ -539,7 +558,17 @@ Ready-to-paste block for the first release:
• No ads, no account, works fully offline
</en-US>
Ready-to-paste block for **1.0.2** (the `versionCode` 3 build):
Ready-to-paste block for **1.1.0** (the freemium build, `versionCode` 4):
<en-US>
• Foto Dup Finder is now free to download and use
• The free version is supported by a single banner; a one-time Pro purchase removes it
• Every duplicate-finding feature stays free
• Existing paid customers keep the ad-free experience
• Privacy options are available where required
</en-US>
Ready-to-paste block for **1.0.2** (the `versionCode` 3 build, historical):
<en-US>
• Maintenance release with compatibility fixes
@@ -564,27 +593,39 @@ Ready-to-paste block for **1.0.1** (the scan-robustness patch):
- [ ] Watch for newer AGP; when it supports it, update `compileSdk` to 37 and bump
the Compose BOM and Coil together (see the version note in the README).
- [ ] Optionally add crash reporting later — but note this would change the Data
safety answers, so weigh it against the "no data leaves the device" promise.
safety answers, so weigh it against the “photos never leave the device” promise.
## 9. Monetisation — decided: one-time paid app, no billing
## 9. Monetisation — freemium ads + one-time Pro
**The decision is made: Foto Dup Finder is a one-time paid app** (rationale, the €2.99 base price,
the €1.49 launch sale and the irreversibility rule: [STORE_LISTING](STORE_LISTING.md) › App pricing).
The Console work is in step 4; **nothing in this repository changes**, because a price on the listing
adds no code, no permission and no Data Safety answer — which is exactly what a free app with a Pro
unlock could not claim.
**Current model: freemium.** The app is free to download. The free tier shows one
anchored adaptive AdMob banner; a one-time Play Billing product **`pro_no_ads`**
removes it. Pro removes ads and nothing else — every scan, selection and deletion
feature stays free. Existing paid installs are grandfathered through
`legacyPro.cutoffEpochMs`.
The Console work is in step 4 and the declarations are in step 5; the full setup and
data-disclosure details are in [MONETIZATION](MONETIZATION.md). Rationale and current
copy: [STORE_LISTING › App pricing](STORE_LISTING.md#app-pricing).
Standing rules:
- **Ads: never.** Every ad SDK needs the `INTERNET` permission to fetch anything, and the
merged-manifest check in step 5, [PRIVACY.md](../PRIVACY.md) and the Data Safety answers all rest
on that permission being absent.
- **In-app purchases: deliberately absent.** If that ever changes, the requirement is Play Billing
**8+** (latest published: 9.1.0, with an extension available to Nov 1, 2026). Worth knowing before
the decision is re-litigated: the **Billing Library itself does not add `INTERNET`** —
`com.android.billingclient:billing:9.1.0`'s manifest declares only `com.android.vending.BILLING`
and `<queries>` for the billing service, which was checked by unpacking the AAR. What *would*
change is the store copy (the "pay once" line), `PRIVACY.md`, the acknowledgement/restore flow, and
the fact that a purchase can only be verified on an internal testing track — never locally.
- **Refunds and support** follow Play's policy for a paid app; keep the contact address in
- **One banner, no interstitials.** Do not add an interstitial, app-open, native or
rewarded format without a product decision and a UX/privacy review.
- **Consent before ads.** UMP must resolve before `MobileAds.initialize()`; a refused
or unresolved consent means no ad request. Pro users skip ad initialisation entirely.
- **Pro never gates a feature.** It removes the banner; a scan limit or a locked
deletion flow would change the product promise and the store copy.
- **Billing is one-time and acknowledged.** Play Billing 9.1.0, product `pro_no_ads`,
pending purchases enabled, acknowledgement retried. The entitlement is client-side
and cached; Play re-verifies on resume.
- **Grandfather paid customers.** Keep the install-time cutoff and document its
limitations; uninstall/reinstall can lose it.
- **Keep Data Safety and `PRIVACY.md` in step.** Google Mobile Ads collects/shares ad
data (ad ID, interactions, diagnostics, IP); photos remain on-device. The **Ads** and
**Advertising ID** answers are **Yes**.
- **Secrets stay out of the repo.** Real AdMob ids and the legacy cutoff live in
`local.properties` or CI Gradle properties; test ids may stay in the build defaults.
- **Re-shoot the store assets.** The committed screenshots and feature graphic predate
the banner and Pro sheet; the freemium listing needs new captures.
- **Refunds and support** follow Play policy; keep the contact address in
[PRIVACY.md](../PRIVACY.md) current.