Show prominent disclosure before runtime permission requests#66
Draft
Miggets7 wants to merge 7 commits into
Draft
Show prominent disclosure before runtime permission requests#66Miggets7 wants to merge 7 commits into
Miggets7 wants to merge 7 commits into
Conversation
…ermission requests
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.
Why
Google Play rejected the Generic App: not compliant with the Prominent Disclosure and Consent Requirement of the User Data policy. Their review video shows the system location dialog firing with no in-app disclosure before it, and the "Background location needed" dialog appearing only after the system prompt.
Root cause: across ORLib, explanatory dialogs were gated behind
shouldShowRequestPermissionRationale, so they only appeared after a first denial. First-time requests went straight to the system dialog.What
New
PermissionDisclosureshelper shows an in-app disclosure (Continue / No thanks) and fires the system permission request only after the user taps Continue. Runs on the UI thread internally since several callers run on the WebView JS bridge thread.All permission request sites now route through it:
GeofenceProvider): disclosure → system fine-location dialog → background disclosure → system background dialog. Guard flag prevents a re-prompt loop after background denial. Decline answers the web app the same way a denial does.OrMainActivity.onGeolocationPermissionsShowPrompt)POST_NOTIFICATIONS)WRITE_EXTERNAL_STORAGE, only requested below Android 10 — not needed on 10+ for DownloadManager)QrScannerActivity)BleProvider,ESPProvisionProvider; below Android 12 the disclosure also explains the location permission needed for BLE scans)Disclosure strings for location include the wording Google requires for background collection ("even when the app is closed or not in use").
Behavior fixes along the way:
Closes #67.