On certain Android 13 devices, when Camera.getPhoto() is called the system allows the user to choose a photo or take a photo. When take a photo is clicked, the system’s camera UI is displayed. A user is then allowed to take a photo. When the photo is taken, it will then ask the user if they would like to retry the photo or if it is ok. When the ok option is selected, the app restarts as if the user had just opened the app. No debugging occurs as the console is wiped everytime this happens.
The Android phones that have reported this happening are as follows:
- Samsung SM-A426U
- Samsung Galaxy S21FE
- Samsung Galaxy S21 5G
This is happening on all versions of @capacitor/camera V5
Here is a working recreation of the bug:
Run the Android app on a physical Samsung Android 13 device like I listed above. Click the + icon on the placeholder image to take a photo. Then quickly click the ok or checkmark button. This should cause the app to restart. I had to take a photo 3 times before the bug started occurring. If it is not occuring, kill the app and restart it and repeat the process.
Does anyone have a fix for this?