Skip to content

Add optional RevenueCat Pro subscription with Firebase Auth#534

Open
apps4av wants to merge 10 commits into
masterfrom
add-revenuecat-pro
Open

Add optional RevenueCat Pro subscription with Firebase Auth#534
apps4av wants to merge 10 commits into
masterfrom
add-revenuecat-pro

Conversation

@apps4av
Copy link
Copy Markdown
Owner

@apps4av apps4av commented May 25, 2026

Mirrors avarex's Pro Services flow on Avare:

  • AvareApplication initializes Firebase and RevenueCat, and syncs any cached Firebase user identity into RevenueCat on startup.
  • New ProActivity hosts the Avarex-style "sign in / register, then subscribe" flow via FirebaseUI Auth (email provider) and the RevenueCat PaywallActivityLauncher, gated by the "Pro" entitlement.
  • MainActivity shows a soft startup dialog (UseCountDialog) that Continue-gates non-subscribers for one second per launch (capped at 30) and offers a Subscribe path into ProActivity. Subscribers skip the dialog entirely.
  • ProServicesPreference adds a permanent "Pro Subscription" entry in Settings that opens ProActivity at any time.

RevenueCat and Firebase are both treated as optional: missing API key, google-services config, or network are swallowed so the app keeps working for non-subscribers. minSdk bumped to 24 to satisfy the RevenueCat Paywalls UI library.

apps4av and others added 10 commits May 25, 2026 11:34
Mirrors avarex's Pro Services flow on Avare:
- AvareApplication initializes Firebase and RevenueCat, and syncs any
  cached Firebase user identity into RevenueCat on startup.
- New ProActivity hosts the Avarex-style "sign in / register, then
  subscribe" flow via FirebaseUI Auth (email provider) and the
  RevenueCat PaywallActivityLauncher, gated by the "Pro" entitlement.
- MainActivity shows a soft startup dialog (UseCountDialog) that
  Continue-gates non-subscribers for one second per launch (capped at
  30) and offers a Subscribe path into ProActivity. Subscribers skip
  the dialog entirely.
- ProServicesPreference adds a permanent "Pro Subscription" entry in
  Settings that opens ProActivity at any time.

RevenueCat and Firebase are both treated as optional: missing API key,
google-services config, or network are swallowed so the app keeps
working for non-subscribers. minSdk bumped to 24 to satisfy the
RevenueCat Paywalls UI library.

Co-authored-by: Cursor <cursoragent@cursor.com>
…gned DataStore native lib

Google Play's pre-launch lab reported on 16 KB page-size devices:
  java.lang.NoClassDefFoundError: Failed resolution of:
      Landroidx/datastore/DataStoreFile;

Two underlying causes:

1. AGP 8.1.1 (Java-only app, no Kotlin plugin) strips top-level Kotlin
   extension classes like androidx.datastore.DataStoreFile from the APK.
   Fixed in AGP 8.4.0+. Bumps the committed project build toolchain to
   AGP 8.13.2 / Gradle 8.13 to match the local development setup and
   pull in the AGP 8.5+ 16 KB-aligned packaging defaults.
   See firebase/firebase-android-sdk#7169.

2. androidx.datastore-core ships libdatastore_shared_counter.so whose
   RELRO segment is 4 KB-aligned, so it fails to load on 16 KB-page
   Android devices. The native lib is only needed for multi-process
   DataStore, which neither Avare nor RevenueCat use. Exclude it from
   the APK so DataStore falls back to its JVM file-lock path.
   See https://issuetracker.google.com/issues/476745201.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant