Add optional RevenueCat Pro subscription with Firebase Auth#534
Open
apps4av wants to merge 10 commits into
Open
Add optional RevenueCat Pro subscription with Firebase Auth#534apps4av wants to merge 10 commits into
apps4av wants to merge 10 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirrors avarex's Pro Services flow on Avare:
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.