Devices reporting the issue:
Device: Google Pixel 3a, Android version (SDK): Android 11 (SDK 30)
Device: Google Pixel 5, Android version (SDK): Android 11 (SDK 30)
Device: Samsung Galaxy S10+, Android version (SDK): Android 10 (SDK 29)
Device: Samsung Galaxy Note10+, Android version (SDK): Android 10 (SDK 29)
ImagePicker.launchCameraAsync is causing the app to crash on Android 10 devices. Works fine on iOS and the Android 11 I tested it on in development. Also it crashes without any errors logged, even wrapping it with a trycatch block gets me nothing.
Anyone got any clue what’s up or where I should look?
It appears that the following note in the expo docs refers to the issue:
Note: Make sure that you handle MainActivity destruction on Android. See ImagePicker.getPendingResultAsync.
However, the docs seem to be describing handling a crash occuring after taking a picture. The crashing described in the question occurs immediately upon calling imagePicker’s camera method.
So from what I can tell, it does not appear possible to prevent the crash from actually happening.