- 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
Play Console rejected the 1.0.1 bundle with "Version code 2 has already been used. Try another
version code." - the upload consumed code 2, so re-uploading that artifact can never succeed. The
next release therefore takes versionCode 3 and versionName 1.0.2, which also gives the pending
edge-to-edge fix a version of its own instead of leaving it unreleased.
Rebuilt both artefacts from the new configuration and checked them rather than assuming the bump
propagated: aapt2 dump badging on the release APK reports versionCode='3' versionName='1.0.2'
targetSdk=36, apksigner confirms the upload certificate (AA:8C:3D:6C:...:4C:7A), and the permission
set is unchanged - still no INTERNET. The AAB is 2,940,935 bytes (sha256 534e5ae9...), and the
unit suite is green: 80 tests, 0 failures, 0 errors.
The documents that carried versionCode 2 as the next upload are corrected: the checklist's
versioning step now quotes the rejection, its artifact row carries the new size and hash, ROADMAP
points at versionCode 3, and the 1.0.1 figures stay as history rather than being overwritten.
The first-upload language around pricing is no longer true either, so it is rewritten: code 2 has
already been uploaded, which means the Console pricing state has to be checked before this rollout
instead of set from scratch. If Products > App pricing still offers "Make your app paid", it has to
be done before the app is offered for free, because that switch is one-way.
CHANGELOG records the new 1.0.2 section with both the versionCode explanation and the edge-to-edge
fix, and the checklist gains a ready-to-paste 1.0.2 "What's new" block.
docs/AD_COPY.md is the new home for the ad copy: five headlines (30 characters) and five
descriptions (90 each), five spares of each for rotation, and the rule that decides the wording —
the app is paid, so "free" cannot appear, and the creatives therefore say "No ads. No uploads.
Fully offline." rather than "Ad-free". The doc checks itself: a python block reads its own tables
and asserts each count and cap, verified against a deliberately over-length row (31 characters with
a stale count) before it was trusted.
It also records the arithmetic the campaign has to clear, because the Console hides it: the price
entered there is *net* and the buyer is charged VAT on top. The live listing reads EUR 3.59 with the
sale at EUR 1.79 — 2.99 x 1.20 and 1.49 x 1.20, the 20% column — where the documents had predicted
only the German 19% figures of 3.56 and 1.77. STORE_LISTING now separates the two numbers, says
which one the strikethrough shows (the gross one, not the EUR 2.99 typed in), and quantifies making
EUR 2.99 the sticker: the tax comes out of the developer's share, so EUR 2.54 a sale becomes
EUR 2.14. PLAY_RELEASE_CHECKLIST carries the correction at the step that enters the price.
For a paid app the install *is* the purchase, so the ceiling is the net per sale — EUR 2.54 at base,
EUR 1.27 during the launch sale — and a target of EUR 0.16 is not a target but a delivery stop: it
implies a 16x return on ad spend that no auction clears. The doc recommends Maximise conversions
first, a EUR 5/day budget sized by what a wrong answer costs, an in-market or custom-segment
audience only if one is wanted at all, and stop/scale rules for the week after. HTML5 last, text,
images and video first — Google's own guidance, quoted.
tools/make-store-assets.sh now renders that image set — 1200x628, 1200x1200, 320x480 — from three
new SVG sources that reuse the icon motif and gradient of icon.svg and feature-graphic.svg verbatim
and embed the committed 03-results screenshot. Two of its checks exist because the first versions
were wrong: comparing the finished PNG with the requested size can never fail, since
--export-width forces it, so the check moved to the *declared* canvas (a sandbox edit to 1200x600
now fails loudly), and --export-area-page is pinned because the cards bleed — the drawing bbox is
1200x710, which an older Inkscape would have squashed into the page. -strip drops the tIME Inkscape
stamps on every render, so two consecutive runs are byte-identical and a rebuild leaves no fake diff
(measured: 0 differing pixels with and without it).
The SVGs are sources, not uploads — Google Ads rejects SVG — so each says so in its header and the
script prints which PNGs to upload. store-assets/app-campaign/ holds those: 8-bit RGB, no alpha.
README points at both the new doc and the new output. No CHANGELOG entry: none of this is an app
change.
Checked the way a browser does it rather than the way curl does, and curl had given a false green:
Gitea sends `Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; sandbox` with
every /raw/ response. That is deliberate - it is what makes serving raw HTML and SVG safe - but it
also blocks the media load when a browser navigates straight to a video, so the tab stays blank with
no error. The same URL plays fine as a subresource, which is exactly why the file's page in Gitea
shows a player: that page embeds <video controls src=".../raw/branch/main/...mp4">.
So the declaration's link is the /src/ page URL, and /raw/ is documented as the curl-and-download
URL instead. Everything verified about both URLs is written down in step 5 - including the two ways
to get a player with no Gitea chrome around it, if that is ever wanted: an unlisted YouTube upload,
or dropping the header for this one path on the Gitea host's Caddy proxy, which must stay scoped to
store-assets/ precisely because that header is what protects raw HTML and SVG.
The file itself was never the problem: 200, video/mp4, Content-Disposition: inline, bytes
sha256-identical to the recording, and Range: bytes=0-99 -> 206 with the matching Content-Range.
Committing the store assets changed a rule that four files stated, so they now state the new one
instead of contradicting the tree:
- STORE_LISTING: "screenshots are not committed" becomes what is committed, why it is safe (every
published frame is generated demo content), and what is still deliberately out of git (raw
captures, demo photos, the video's milestone PNGs). It also spells out the public URL pattern,
because that is now the deployment step rather than a footnote.
- PLAY_RELEASE_CHECKLIST: the two "(git-ignored)" annotations on the screenshot directories become
"(committed)", and step 5's video item carries the exact link to paste plus what was verified
about it (200, video/mp4, Content-Disposition: inline, sha256 match) and the two traps in using
it (pinned to main, so a re-shoot overwrites in place; and replacing it at all means resubmitting
the declaration).
- ROADMAP: M10 no longer claims the screenshots are left uncommitted, and the declaration's blocker
row loses its "hosting remains" clause - the file is published, so only pasting is left.
- README: says where the link comes from, so the next reader does not go looking for a host.
Two Console-facing subjects, both decided here instead of in the Console.
Tablet screenshots (7-inch and 10-inch)
--------------------------------------
Play keeps a separate screenshot slot per form factor and asks for at least four
screenshots on tablets, so the four phone captures did not cover them. Both sets are now
captured on AOSP Android 12 AVDs, over the same generated 22-photo demo library, and
normalised with FORM_FACTOR=tablet-7in|tablet-10in:
- 7-inch - Nexus 7 2013: 1200x1920 portrait, sw600dp, 320 dpi, four files
- 10-inch - Medium Tablet: 1600x2560 portrait, sw800dp, 320 dpi, four files
This machine has no /dev/kvm - the node cannot even be created, because mknod is refused
for the container as root - so the emulator ran in pure software emulation (-accel off
-no-window -gpu swiftshader_indirect): about 3 minutes to boot, 1-12 s per screenshot.
hide_error_dialogs was switched on and the animation scales off, because under TCG
SystemUI raises an ANR dialog that would otherwise sit in the frame; the 10-inch profile
boots landscape and its portrait rotation is 3, not 0. The scanning frame comes from a
screencap burst started before the tap, since 22 photos scan in seconds, and the tap
coordinates come from uiautomator dumps rather than guesswork.
The results screens are not staged: a finished scan auto-selects all but best, so "14
selected, 43.7 MB" is the default state. 2 duplicate groups, 16 of 22 photos, 43.7 MB
reclaimable, scanned in 39.7 s (7-inch) and 53.1 s (10-inch). Nothing except the demo
library was ever pushed to either AVD and it is deleted again afterwards, so no real
photo can appear in the tablet sets. Screenshots stay out of git, as before.
App pricing: a one-time paid app
--------------------------------
The one irreversible decision in this release. Play's rule: an app can go paid -> free,
but "once your app has been offered for free, the app can't be changed to paid" - a new
package name would be needed - so this had to be settled before the first upload, which
has not happened yet (versionCode 2).
Chosen over free with a Pro unlock because it is the only model that costs the app
nothing: no Billing dependency, no com.android.vending.BILLING permission, no Data
Safety answers, and the "no internet permission at all" claim survives untouched.
Checked rather than assumed: unpacking com.android.billingclient:billing:9.1.0 shows its
manifest declares only com.android.vending.BILLING and the billing service queries, so
in-app purchase would not have added INTERNET either. Billing 8+ is the current
requirement (latest 9.1.0) if that is ever revisited.
Price: base EUR 2.99 with a 14-day 50% launch sale at EUR 1.49. A EUR 1 base price was
considered and rejected: a sale can always be added, but a low anchor cannot be undone,
and a paid app's first transaction is its only transaction. Play's fee for a paid app's
initial purchase is 10% + 5% billing fee (~15%) for the first $1M/year of new-install
transactions in the EEA, so EUR 2.99 nets ~EUR 2.54 against ~EUR 0.85 at EUR 1. The sale
rules shape the launch: 1-14 days live, 30 days between one sale ending and the next
starting, and the app must be published before a sale can be created. The strikethrough
does appear in Germany, which is not one of the 12 EU states and the UK that hide it.
The listing copy had to stop saying "free": the short description is now "Find and remove
duplicate photos. Ad-free, works offline, no uploads." (69/80 chars) and the full
description gains one factual pay-once line plus a "sold through Google Play as a
one-time purchase" bullet (2,426/4,000). The price stays out of the title, icon and
developer name, because Play's metadata policy forbids price and promotional wording
there. PRIVACY.md gains a Purchases section - Google Play processes the payment, the app
has no payment code and no network access at all - and its date moves to 2026-10-14, so
the published copy needs re-pushing to Gitea.
No code changed, so the signed 1.0.1 .aab is untouched (sha256 f8e6a29a...). What is
left is Console work: a payments profile, the price and the launch sale on Products >
App pricing, and a promo-code copy to test the paid listing end to end.
Everything the Play forms ask for that can be settled from the working copy, settled:
- PRIVACY.md now carries the real contact address (softwareapp.hb@gmail.com), so the
policy publishes as-is. Hosting is the one step left that cannot be done from here,
because the repo has no git remote: step 5 of the checklist spells out the push +
GitHub Pages route and the URL it yields.
- Checklist: the screenshot item is done (four captures, 1080x2160, over the demo
library, no permission banner), the keystore and versionCode are recorded as already
in place - including the upload key's SHA-256 for the Play App Signing enrolment - and
the App access / Ads / remaining App content declarations are written down. The
first-upload release-notes question is answered too: versionCode is already 2, so
1.0.1 takes the *initial release* block, not the 1.0.1 one.
- The build facts were verified against the artefacts rather than the source: the
release APK reports versionCode=2, versionName=1.0.1, targetSdk=36 and exactly the
documented permission set, with no INTERNET in what actually ships.
- ROADMAP: the re-shoot row is struck out with the numbers that closed it, M10 no longer
claims the captures predate the demo library, and the demo library's removal is
recorded (MediaStore 5,386 -> 5,364; pruneTo drops the stale index rows next scan).
The staged state and the system confirmation dialog are documented as deliberately not
captured: staging clears the demo group, which would put real photos back in frame.
The three captures no longer show the "Photo access needed" banner, and the results
screen is a picture of the generated demo library instead of the developer's own.
Both caveats in the file are closed, so replace them with a short note on how the set
was actually taken:
- 01-empty: the grant went through the app's own "Grant access" button, so
checkSelfPermission is genuinely satisfied. This one needed no tap at all: results
and the selection live in ScannerViewModel and only the hash index is persisted, so
force-stop + relaunch returns to the empty state with the grant still in place.
- 02-scanning / 03-results: shot after tapping Scan over the demo library. The headline
group is 43.1 MB reclaimable, which out-ranks the biggest group already on the device
(39.8 MB), so the first group in frame is generated.
- 04-options is new: the Options DropdownMenu with the three sensitivity presets (it is
not a bottom sheet) and the trash-vs-permanent toggle.
The tick marks and the "37 selected" bar are the screen's default state, not a staged
tap -- a finished scan auto-selects all but best. MIUI still refuses pm grant and
synthetic taps (INJECT_EVENTS), so Grant access and Scan remain the two taps a human
has to make; the two screens still missing (the staged state and the system consent
dialog) are captured by watching for UI text changes instead, rather than by timing a
scripted tap.
store-assets/screenshots/ is git-ignored now, so the Graphics section and the
two blocker entries were describing a state that no longer exists. Point at
where the captures live instead, and say why screenshots stay out of git at
all: a screenshot of this app is a picture of a photo library.
The results screenshot is a screenshot *of a photo library*, so the committed
capture showed the developer's own photos. tools/make-demo-photos.py draws the
library instead: 22 procedural scenes (sunset, mountains, beach, conifers in
haze, dunes, city skyline, night sky, bokeh) with grain and a vignette, so there
are no people, no third-party content and nothing to license.
The duplicate structure is deliberate, because a folder of unrelated pictures
demonstrates nothing:
- headline group: one scene re-saved at falling quality and size until its
reclaimable size reaches --target-mb (45 MB). Results are ranked by
reclaimable bytes, so this group has to out-rank whatever is already on the
device or a real photo is the first thing back in frame.
- exact pair: two byte-identical files, for the SHA-256 path.
- singles: the other scenes, once each, so the library looks lived-in.
Verified with the app's own engine on the desktop before pushing anything:
22 images -> 2 groups (PERCEPTUAL 14 copies, EXACT 2 copies) with the six
singles left alone. Regeneration is byte-identical, the output path resolves
from __file__ so it runs from any cwd, and nothing is written outside the repo.
demo-photos/ is git-ignored, like fixtures/ and store-assets/raw-screenshots/.
STORE_LISTING.md documents the library, why the headline group has a target
size, the MediaProvider scan_file recipe and the cleanup step; ROADMAP, README
and the release checklist point at it.
An Android duplicate-photo finder. Pure-Kotlin core (SHA-256 + dHash hashing, exact and
perceptual union-find grouping, three sensitivity presets) with MediaStore access, a
persistent SQLite hash index and a tiered ScanEngine behind a Jetpack Compose UI.
No INTERNET permission, no ads, no analytics, no account.
Ships versionCode 2 / versionName 1.0.1, carrying the scan-stall hardening (BoundedCall
breaker) and verified against a 5,363-photo device library. 80 JVM unit tests, lint clean.
Release paperwork is in docs/ (Play checklist, store listing, edge-case testing), the
upload-ready Play graphics and screenshots in store-assets/, and the generators for those
assets in tools/.