wymsee / cordova-imagePicker

Cordova Plugin For Multiple Image Selection
MIT License
407 stars 857 forks source link

android 6.0.1 LGE Nexus 5X #158

Open giantss opened 8 years ago

giantss commented 8 years ago

image android 6.0.1 phone: LGE Nexus 5X

giantss commented 8 years ago

suggest: On android phones add more pick an album catalog, if the picture is more user disposable loading all the pictures will be very slow, need a long time to load

tobeee commented 8 years ago

Yup I've got the same problem. I've tried using the updated Class file from https://github.com/Findiglay/cordova-imagePicker but it doesn't seem to work either.

I've also added the correct permission to my AndroidManifest.xml <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

Anyone have any luck on Android 6?

tobeee commented 8 years ago

I actually fixed it. If you do the above it's important that you make sure the plugin is rebuilt when you create the APK. If you do so, it should work fine!

Feel free to let me know if you can't get it working. For me, I just had to manually update the

platforms/android/src/com/synconset/MultiImageChooserActivity.java with the one from https://github.com/Findiglay/cordova-imagePicker/blob/20dbe9d027da990a8b7e514aa4b5262181beadc3/src/android/Library/src/MultiImageChooserActivity.java

chanat commented 8 years ago

Thanks tobeee. I was having the same problem and your code fix it for me. +1

technotip commented 8 years ago

@tobeee Thanks a lot for the code, its working perfectly.

Can you please explain us why replacing this 'MultiImageChooserActivity.java' file works? What code was wrong?

tobeee commented 8 years ago

Ah so I just copied that file from another one of the other messages on here - the credit goes to @findiglay for noticing that Android M has slightly different permissions for new apps. The file above adds a check for ReadExternalStoragePermission, and asks for it it's not there. Otherwise the app crashes as the permission has not been requested - which is a change from Android < 6

giantss commented 8 years ago

I wrote a multi-android selected image plugin (with directory)

Compulsed commented 7 years ago

I'm having this exact problem, and pointing to the library fork that @tobeee mentioned worked!