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
+35
View File
@@ -31,6 +31,26 @@
<!-- Android 13+: shows the scan progress notification (optional, never required). -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<!--
Free-tier ads and the optional Pro purchase are the only network users. Photo
processing never leaves the device. The Google Mobile Ads SDK also merges
AD_ID, WAKE_LOCK and the ACCESS_ADSERVICES_* Privacy Sandbox permissions into
the merged manifest; billing-ktx merges com.android.vending.BILLING. The release
checklist audits the MERGED manifest, not this source file.
-->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!--
The freemium build has the applicationId `…finder.free`, while the old paid app
is `…finder`. If the paid app is still installed, LegacyPro reads its
firstInstallTime to grandfather the purchase. This package-visibility query is
the only cross-package signal available without a backend.
-->
<queries>
<package android:name="de.softwareapp_hb.fotodup.finder" />
</queries>
<application
android:name=".FotoDupApplication"
android:allowBackup="true"
@@ -44,6 +64,21 @@
android:theme="@style/Theme.FotoDupFinder"
tools:targetApi="33">
<!--
Required by the Google Mobile Ads SDK. The value comes from
`admob.appId` in local.properties (or -Padmob.appId=...); the default is
Google's public test app id, which is safe for debug builds.
-->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="${admobAppId}" />
<meta-data
android:name="com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION"
android:value="true" />
<meta-data
android:name="com.google.android.gms.ads.flag.OPTIMIZE_AD_LOADING"
android:value="true" />
<activity
android:name=".MainActivity"
android:exported="true"