Skip to content

Add camera-permission-denied handling to the access-scanner screen #233

Description

@Lakes41

Difficulty: Intermediate
Type: bug

Background
app/access-scanner.tsx implements the QR code scanner screen using expo-camera, which requires runtime camera permission on both iOS and Android.

Problem
It's not clear the scanner screen handles the case where the user denies camera permission (or has previously denied it at the OS level) — a bare expo-camera integration without explicit handling typically shows a blank/broken preview instead of clear guidance.

Expected outcome
When camera permission is denied, access-scanner.tsx shows a clear explanation of why the permission is needed, a button to re-prompt (if the OS allows re-prompting) or deep-link to the device's app settings (if permanently denied), and a way to navigate back without being stuck on a broken screen.

Suggested implementation

  • Use expo-camera's permission hook to check current status (granted, denied, undetermined) on screen focus.
  • For undetermined, prompt for permission with a short rationale beforehand.
  • For denied (especially permanently denied on iOS), show a message with a button linking to system settings (Linking.openSettings()).
  • Add a clear "Back" affordance so the user isn't stuck.
  • Manually verify on both iOS and Android simulators (permission flows differ slightly between platforms).

Acceptance criteria

  • Denied permission shows a clear explanation and a way to open system settings
  • Undetermined permission shows a rationale before the OS prompt
  • User can always navigate away from the scanner screen
  • Verified on both iOS and Android

Likely affected files/directories

  • app/access-scanner.tsx

Metadata

Metadata

Assignees

Labels

GrantFox OSSGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesOfficial Campaign | FWC26Official FWC26 campaign issue — eligible for campaign scoring and rewardsUI/UXUser interface or user experience improvements and design workbugConfirmed defect or incorrect behavior that needs to be fixedintermediateIntermediate difficulty tasks requiring solid experience and some context

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions