With Android device, once select "take photos" or "choose from library", App will crash ~!
See original GitHub issueBut on Genymotion simulator, everything is OK.
I captured the certain error, it seems there is conflict with react-native-navigation
, but I don’t know which file I can modify to fix this issue.
error log:
FATAL EXCEPTION: mqt_native_modules
Process: com.aotumeeting, PID: 16467
java.lang.UnsupportedOperationException: NavigationActivity must implement OnImagePickerPermissionsCallback
at com.imagepicker.ImagePickerModule.permissionsCheck(ImagePickerModule.java:594)
at com.imagepicker.ImagePickerModule.launchCamera(ImagePickerModule.java:225)
at com.imagepicker.ImagePickerModule.launchCamera(ImagePickerModule.java:203)
at com.imagepicker.ImagePickerModule$2.onTakePhoto(ImagePickerModule.java:159)
at com.imagepicker.utils.UI$1.onClick(UI.java:54)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
App crashes when selecting photo from PhotoLibrary in ...
I was trying to select a photo from the photo library using a Android device , the app crashed. I have followed the...
Read more >Xamarin Android app crashing right after taking (or selecting ...
Occasionally and intermittently, the app will crash after taking a photo with the camera OR selecting an image from the phone's gallery.
Read more >image_picker crash after taking 2 or 3 pictures on ... - GitHub
Run the image_picker example app; Select image picker camera; Repeat until the app crashes (I have crashes after 3-4 photos).
Read more >Detect and diagnose crashes - Android Developers
An app that is written using Java or Kotlin crashes if it throws an unhandled exception, represented by the Throwable class.
Read more >ionic android : when choose image from gallery the app crash
It will be easier and you will get more control in accessing images and its properties. You can use either Camera plugin or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You either need to have NavigationActivity implement OnImagePickerPermissionsCallback or you need to modify ImagePickerModule to cast the activity to a PermissionAwareActivity instead of an OnImagePickerPermissionsCallback.
See PermissionAwareActivity line 576-597, Here’s the change I made:
Hi @aarontrank,
Thank you for your solution! I think we can just replace ReactActivity by PermissionAwareActivity since ReactActivity implements PermissionAwareActivity.
Current code
New solution