Skip to content

Conversation

@callebtc
Copy link
Collaborator

@callebtc callebtc commented Jan 9, 2026

🐛 Fix: Camera Crash on Long Press

Broken by: Commit c663e8e (Jan 4, 2026) in PR #529 (QR Verification).

Technical Root Cause:
The QR Verification feature added <uses-permission android:name="android.permission.CAMERA" /> to AndroidManifest.xml.

  • Before: The app did not declare the CAMERA permission. Android allows apps to use MediaStore.ACTION_IMAGE_CAPTURE to delegate photo taking to the system camera app without requiring any permissions.
  • After: Once the CAMERA permission is declared in the manifest, Android enforces that the app must have this permission granted at runtime to use the camera, even when using an external intent like ACTION_IMAGE_CAPTURE. Failing to do so results in a SecurityException.

The Fix:
Updated ImagePickerButton.kt to explicitly check for Manifest.permission.CAMERA at runtime and request it if not granted, before launching the camera intent.


Description

Checklist

@callebtc callebtc merged commit 0306ed4 into main Jan 9, 2026
1 check passed
@callebtc callebtc deleted the fix/camera-button branch January 9, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants