Skip to content

Custom modal not displayed before requesting location permission #93747

@Julesssss

Description

@Julesssss

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

  1. 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.

  2. 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.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions