ImagePicker icon indicating copy to clipboard operation
ImagePicker copied to clipboard

Not working in android 33

Open aerocube-tech opened this issue 3 years ago • 1 comments

aerocube-tech avatar Oct 14 '22 06:10 aerocube-tech

WhatsApp Image 2022-10-18 at 10 17 14 AM

Please find the attached Screenshot. It working fine on android 31. But when it switch to android 33. This show error on reading media file. Please check and verify.

jateengadhiya avatar Oct 18 '22 04:10 jateengadhiya

Hello any idea? It's seam a permission problem

ZoeVale avatar Nov 10 '22 00:11 ZoeVale

Hi guys, I don't have any device running api 33. So I test it on emulator but do not see any permission issue. It would be nice if you guys help me debug the error while I'm earning money to buy new device. Thanks a lot!

nguyenhoanglam avatar Nov 14 '22 08:11 nguyenhoanglam

hi @nguyenhoanglam about test this issue you can start application accept permission (if you have any) and then go to settings of your app and remove permission.

You notice that permission are for you library not for the application so you can't resolve the issue

ZoeVale avatar Nov 14 '22 14:11 ZoeVale

Got the Solution. You required extra permission for android Tiramisu (Android 13) Read Media Images

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" />

aerocube-tech avatar Nov 16 '22 08:11 aerocube-tech

please check the @link

aerocube-tech avatar Nov 16 '22 08:11 aerocube-tech

@aerocube-tech How did you solve it? I tried add READ_MEDIA_IMAGES permission into AndroidManifest and runtime asked on this permission but I am still getting blank screen like on screenshot above

petrstetka avatar Nov 25 '22 17:11 petrstetka

@petrstetka This is how you set the permission in manifest.

<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" tools:replace="android:maxSdkVersion"/>

and later you have to fork this library into your project and update permission request relevant sdk version. If still not get it please contact me on [email protected]

aerocube-tech avatar Nov 26 '22 06:11 aerocube-tech

@aerocube-tech @jateengadhiya @ZoeVale @petrstetka Version 1.5.5 is available now. Please help me check it out and let me know if the bug is gone.

Sorry for letting you guys wait for so long... 😅

nguyenhoanglam avatar Nov 26 '22 13:11 nguyenhoanglam

Ho @nguyenhoanglam i try in the afternoon. At a moment I resolve problems with a tricks.

On OnCreate I call my fun "checkPermission" so if there's some problems I resolve.

But it doesn't run if user go to steering's and toggle the permissions.

zoelounge avatar Nov 26 '22 14:11 zoelounge

@zoelounge You can try v1.5.5 without using any tricks. READ_EXTERNAL_STORAGE has been removed on Android 13. That's why the permission request always fails. So, I've added READ_MEDIA_IMAGES to support Android 13 or higher. Please check it out!

nguyenhoanglam avatar Nov 26 '22 14:11 nguyenhoanglam

Ok I'll try it in the afternoon. Thanks so much for your job. 👍

zoelounge avatar Nov 26 '22 14:11 zoelounge

@nguyenhoanglam Version 1.5.5 works for me on Android 13. Thank you! In my opinion, this issue can be closed and be considered as resolved.

petrstetka avatar Nov 27 '22 23:11 petrstetka