Android-Image-Cropper icon indicating copy to clipboard operation
Android-Image-Cropper copied to clipboard

Fixed scoped storage issue on Android 10

Open ravindu1024 opened this issue 4 years ago • 8 comments

Fixed issue where the gallery options were not showing up in the image source picker on Android 10 devices. This is due to the new scoped storage requirements of 10. Limitations - unable to show gallery types on the picker. I could only manage to show a single file picker. Test - run "quick start" on an Android 10 device. The gallery intents are not shown without this fix.

ravindu1024 avatar Jan 20 '20 11:01 ravindu1024

Gallery still doesn't show up in android 10 devices. library version set 2.8.+ KakaoTalk_Photo_2020-06-04-12-10-08

huiseopLee avatar Jun 04 '20 03:06 huiseopLee

@huiseopLee this fix isn't merged to the project yet. You can try my fork which has the Android 10 fix: https://github.com/ravindu1024/Android-Image-Cropper. Just try the latest via jitpack with : implementation 'com.github.ravindu1024:Android-Image-Cropper:2.8.2'

ravindu1024 avatar Jun 04 '20 03:06 ravindu1024

@huiseopLee this fix isn't merged to the project yet. You can try my fork which has the Android 10 fix: https://github.com/ravindu1024/Android-Image-Cropper. Just try the latest via jitpack with : implementation 'com.github.ravindu1024:Android-Image-Cropper:2.8.2'

sorry but it still doesn't work. I downloaded and tried your fixed sample app below link, that is also doesn't work. "https://github.com/ravindu1024/Android-Image-Cropper/tree/android10-gallery-fix"

huiseopLee avatar Jun 04 '20 05:06 huiseopLee

I am wondering why adding a file provider to the Manifest file solves the problem. As it is mentioned here, it should be enough to use a regular intent with ACTION_GET_CONTENT. Do you know what exactly causes the gallery to be hidden for some devices on Android 10?

ClouddJR avatar Jun 26 '20 15:06 ClouddJR

@huiseopLee this fix isn't merged to the project yet. You can try my fork which has the Android 10 fix: https://github.com/ravindu1024/Android-Image-Cropper. Just try the latest via jitpack with : implementation 'com.github.ravindu1024:Android-Image-Cropper:2.8.2'

@ravindu1024 Thank you so much it works!!! Will it also work with older versions?

richiisandii avatar Aug 09 '20 05:08 richiisandii

On a Pixel 4XL - Android R beta, the 'photos' app is a visible option. I don't believe there are any other 'gallery' apps that come stock with it.

The alternative repo didn't work for me either. It still returns a null uri and crashes.

behelit avatar Sep 08 '20 04:09 behelit

Hey!

I start a new project to handover this library https://github.com/CanHub/Android-Image-Cropper

The ideia is that we keep improving because this project don't have updates since 2018 Hope I can count with your help.

Open to contribute, next pieces of work will be Android 11 permissions, refactor into Kotlin and ActivityContract

Canato avatar Nov 27 '20 15:11 Canato

Good idea @Canato. This fix however will become redundant when you implement Android 11 permissions.

ravindu1024 avatar Nov 28 '20 00:11 ravindu1024