Skip to content
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

[ANDROID] Importing from "Downloads" folder #698

Open
zipou opened this issue May 15, 2018 · 11 comments
Open

[ANDROID] Importing from "Downloads" folder #698

zipou opened this issue May 15, 2018 · 11 comments

Comments

@zipou
Copy link

zipou commented May 15, 2018

Hello,

I wanted to report something while I tried to import pictures from the "Download" folder.
I think there may be something I don't get yet about Android API libs and dependencies but in case someone already have or had a similar issue...

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.20.1
  • react-native v0.47.2

Platform

  • Android

minSdkVersion 16
targetSdkVersion 23

implementation 'com.android.support:appcompat-v7:27.1.0'

Expected behaviour

I pick a photo from the Download folder on Android

Actual behaviour

Steps to reproduce

  1. openPicker({
    multiple: true,
    maxFiles: 24,
    includeBase64: false,
    waitAnimationEnd: false,
    showLoader: false,
    includeExif: true,
    mediaType: 'photo',
    })

  2. Select photo from "Download" folder (see 'capture d ecran 2018-05-15 a 17 52 12')

Attachments

capture d ecran 2018-05-15 a 17 52 12

capture d ecran 2018-05-15 a 17 51 42

// stacktrace or any other useful debug info

"For input string: "raw:/storage/emulated/0/Download/IMG_0005.JPG""

code : "E_NO_IMAGE_DATA_FOUND"
framesToPop: 1

"Error: For input string: "raw:/storage/emulated/0/Download/IMG_0005.JPG"
at createErrorFromErrorData (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:1735:15)

@ayushnawani
Copy link

@zipou Selecting images from download folder its working for me,
But only while selecting a video its throwing error.

06-20 15:57:57.286 19722-19722/com.solveninja E/image-crop-picker: Promise rejected. Invalid image selected
06-20 15:57:57.288 19722-20327/com.solveninja I/ReactNativeJS: 'Picker Error : ', { [Error: Invalid image selected] framesToPop: 1, code: 'E_NO_IMAGE_DATA_FOUND' }

@anda-nenu-clarisoft
Copy link

anda-nenu-clarisoft commented Jul 16, 2018

Hello,
This happened to me also. I tried to get an image from the Download folder and return the follwing

07-16 14:34:55.853 21828-21828/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /data/user/0/com.android.providers.downloads/cache/right3.png (Permission denied)
07-16 14:34:55.853 21828-21828/? E/image-crop-picker: Promise rejected. Invalid image selected

It happens on android 8, and all permissions are granted.

@srinusonly
Copy link

Any update on this?

@anda-nenu-clarisoft
Copy link

@srinusonly the only way I could get this working was to update the libraries - react-native, react-native-image-crop-picker, all the libraries

@landonalder
Copy link

This issue is fixed for me in the latest version of this library (0.20.3)

@iamolegga
Copy link

"react-native-image-crop-picker": "^0.23.0",
the same issue

@hich-dev
Copy link

hich-dev commented Aug 4, 2019

@ivpusic @zipou is there a fix for this yet? I get same error message as @anda-nenu-clarisoft.

@nwaughachukwuma
Copy link

nwaughachukwuma commented Aug 4, 2019

Same @hich-dev see a ref to similar issue here. Please do let me know when you find something .

@nwaughachukwuma
Copy link

@ivpusic and @hich-dev so I got it to work using new ucrop version 2.2.3 (non native) as specified here. But then I don't know why I get following message in my stack trace:

08-04 04:46:29.015  8267  8452 I BitmapCropTask: Should crop: true
08-04 04:46:29.087  8267  8267 I ExifInterface_JNI: Raw image not detected
08-04 04:46:29.143  8267  8267 D image-crop-picker: Skipping image compression
08-04 04:46:29.169  8267  8267 I ExifInterface_JNI: Raw image not detected

Please pay attention to the 3rd line skipping image compression. Please what does this mean for us? And what does the line get power of the native code to preserve image quality (+ about 1.5 MB to an apk size) in the ref link above really mean when am not using the -native version.

Thanks so much

@zcgit
Copy link

zcgit commented Aug 29, 2019

@ivpusic and @hich-dev so I got it to work using new ucrop version 2.2.3 (non native) as specified here. But then I don't know why I get following message in my stack trace:

08-04 04:46:29.015  8267  8452 I BitmapCropTask: Should crop: true
08-04 04:46:29.087  8267  8267 I ExifInterface_JNI: Raw image not detected
08-04 04:46:29.143  8267  8267 D image-crop-picker: Skipping image compression
08-04 04:46:29.169  8267  8267 I ExifInterface_JNI: Raw image not detected

Please pay attention to the 3rd line skipping image compression. Please what does this mean for us? And what does the line get power of the native code to preserve image quality (+ about 1.5 MB to an apk size) in the ref link above really mean when am not using the -native version.

Thanks so much

image
you can take a look at this.

@nwaughachukwuma
Copy link

Thanks @zcgit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants