Problem
Google Play rejected our latest release for missing Prominent Disclosure on BACKGROUND_LOCATION. I am sure our custom modal used to show before the OS permission prompt, but it now no longer fires in the canAskAgain === false branch of the GPS distance flow.
In BackgroundLocationPermissionsFlow/index.android.tsx and index.ios.tsx, once foreground or background location has been denied with "don't ask again", checkPermissions() calls onDeny() immediately without rendering any modal.
The flow we want to match is Scan Receipt flow, where we prompt for location, first with our custom UI modal LocationPermissionModal.
Solution
-
Render the disclosure modal before onDeny() in the bypass branches on both Android and iOS, so the user always sees the prompt (with appropriate "open device settings" CTA when canAskAgain is false) before the flow proceeds.
-
We shouldn't be re-prompting over and over. If the user declines once on iOS/twice on Android the OS will block our attempt to show the native modal. Lets make sure that Similar to our other permission prompts, we:
- Always show a custom pre-prompt modal
- If they approve, only then show the native permission prompt
- If they have cancelled too many times already, show a different message explaining how they can manually enable the permission in their OS app settings menu
Then as a follow up I'd like to mirror this flow for notification permission prompt.
Problem
Google Play rejected our latest release for missing Prominent Disclosure on
BACKGROUND_LOCATION. I am sure our custom modal used to show before the OS permission prompt, but it now no longer fires in thecanAskAgain === falsebranch of the GPS distance flow.In
BackgroundLocationPermissionsFlow/index.android.tsxandindex.ios.tsx, once foreground or background location has been denied with "don't ask again",checkPermissions()callsonDeny()immediately without rendering any modal.The flow we want to match is Scan Receipt flow, where we prompt for location, first with our custom UI modal
LocationPermissionModal.Solution
Render the disclosure modal before
onDeny()in the bypass branches on both Android and iOS, so the user always sees the prompt (with appropriate "open device settings" CTA whencanAskAgainis false) before the flow proceeds.We shouldn't be re-prompting over and over. If the user declines once on iOS/twice on Android the OS will block our attempt to show the native modal. Lets make sure that Similar to our other permission prompts, we:
Then as a follow up I'd like to mirror this flow for notification permission prompt.