-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [IOAPPX-479] Fix camera permission request on Android devices #6687
base: master
Are you sure you want to change the base?
fix: [IOAPPX-479] Fix camera permission request on Android devices #6687
Conversation
Jira Pull Request LinkThis Pull Request refers to Jira issues: |
PR Title Validation for conventional commit type✅ All good! PR title follows the conventional commit type. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6687 +/- ##
==========================================
- Coverage 49.95% 49.93% -0.02%
==========================================
Files 1540 1541 +1
Lines 32192 32204 +12
Branches 7295 7300 +5
==========================================
+ Hits 16081 16082 +1
- Misses 16072 16084 +12
+ Partials 39 38 -1
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
531604a
to
df26774
Compare
…on-android-devices
Short description
This PR refactors the camera permission request logic on Android to align with the platform-specific behavior.
Detailed description
On Android, camera permission handling logic differs from iOS. When the app checks the permission status for the first time it receives a "denied" response, but this does not necessarily mean that the user has explicitly denied access and it simply can indicate that the permission has not been requested yet.
To address this, we decided to show the permission prompt as soon the user navigates to the barcode scanner screen.
This change only addresses Android, the logic remains unchanged on iOS.
Demo
Registrazione.schermo.2025-02-05.alle.14.38.30.mov
List of changes proposed in this pull request
useCameraPermissionStatus
hook to separate camera permission request logic fromuseIOBarcodeCameraScanner
LoadingSpinner
toBarcodeScanBaseScreenComponent
when the camera permission isundefined
How to test
With an Android device: navigate to the barcode scanner screen and verify the following behaviors:
With an iOS device: navigate to the barcode scanner screen and verify that there aren't regressions.