Problem
If user grants camera permission, then revokes it in system settings, and taps 'Take Photo' again, a SecurityException can occur.
Fix Applied
Wrapped cameraLauncher.launch() in try-catch. But the UX should also show a message explaining why camera isn't working.
TODO
- Show a Snackbar/Toast when camera permission is missing
- Offer a button to open app settings for re-granting
Problem
If user grants camera permission, then revokes it in system settings, and taps 'Take Photo' again, a SecurityException can occur.
Fix Applied
Wrapped
cameraLauncher.launch()in try-catch. But the UX should also show a message explaining why camera isn't working.TODO