React-native-image-crop-picker: Android 10 - OpenCamera and OpenPicker do not work

Created on 14 Aug 2020  路  6Comments  路  Source: ivpusic/react-native-image-crop-picker

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.32.2
  • react-native v0.63.3

Platform

  • Android with targetSdkVersion = 29

Expected behaviour

OpenCamera and Open picker should work

Actual behaviour

You recieve an error:
Open Camera => E_FAILED_TO_OPEN_CAMERA Permission denied
Open Picker => E_NO_IMAGE_DATA_FOUND

Steps to reproduce

  1. Install The last RN Version as a new App

  2. Try to open de picker or the camera

  3. Crash happens

Love react-native-image-crop-picker? Please consider supporting our collective:
馃憠 https://opencollective.com/react-native-image-crop-picker/donate

Most helpful comment

Fixed by adding this to the AndroidManifest.xml:

...
android:requestLegacyExternalStorage="true"
...
>

This is a temporary solution and will fail once this is built to Target Level 30 API. (targetSdkVersion = 30)

All 6 comments

Fixed by adding this to the AndroidManifest.xml:

...
android:requestLegacyExternalStorage="true"
...
>

This is a temporary solution and will fail once this is built to Target Level 30 API. (targetSdkVersion = 30)

Any updates, solution?

Somehow it just opened but after capturing the image app crashes and restarts from the initial splash screen

I'm using latest version of library and I'm facing this issue. All permissions dialogs pop up, allow all of them and before showing the camera, the app crashes. Using emulator with Android 10 to test target api level 29. I didn't had issues with emulated camera before. My gradle is:

buildscript {
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 16
compileSdkVersion = 29
targetSdkVersion = 29
supportLibVersion = "28.0.0"
googlePlayServicesVersion = "16.0.0"
}

@jpsolero suggestion did not work for me

try version https://github.com/ivpusic/react-native-image-crop-picker/releases/tag/v0.35.0

I was using an emulator where the emulated camera was not working properly (camera app in emulator was not working).
Once I fixed that, image picker worked as expected with 0.34.1 version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

althurzard picture althurzard  路  3Comments

victorwpbastos picture victorwpbastos  路  3Comments

JodiWarren picture JodiWarren  路  3Comments

manojshrimalla picture manojshrimalla  路  3Comments

Phenek picture Phenek  路  3Comments