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

Permission ACCESS_MEDIA_LOCATION [BUG] #220

Open
agnoam opened this issue Oct 6, 2020 · 4 comments
Open

Permission ACCESS_MEDIA_LOCATION [BUG] #220

agnoam opened this issue Oct 6, 2020 · 4 comments
Assignees
Labels

Comments

@agnoam
Copy link

agnoam commented Oct 6, 2020

Describe the bug

E/MethodChannel#multi_image_picker(22324): Failed to handle method call
E/MethodChannel#multi_image_picker(22324): java.lang.UnsupportedOperationException: Caller must hold ACCESS_MEDIA_LOCATION permission to access original
E/MethodChannel#multi_image_picker(22324): 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:172)
E/MethodChannel#multi_image_picker(22324): 	at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:151)
E/MethodChannel#multi_image_picker(22324): 	at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:705)
E/MethodChannel#multi_image_picker(22324): 	at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1687)
E/MethodChannel#multi_image_picker(22324): 	at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1503)
E/MethodChannel#multi_image_picker(22324): 	at android.content.ContentResolver.openInputStream(ContentResolver.java:1187)
E/MethodChannel#multi_image_picker(22324): 	at com.vitanov.multiimagepicker.MultiImagePickerPlugin.onMethodCall(MultiImagePickerPlugin.java:299)
E/MethodChannel#multi_image_picker(22324): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:230)
E/MethodChannel#multi_image_picker(22324): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#multi_image_picker(22324): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/MethodChannel#multi_image_picker(22324): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#multi_image_picker(22324): 	at android.os.MessageQueue.next(MessageQueue.java:336)
E/MethodChannel#multi_image_picker(22324): 	at android.os.Looper.loop(Looper.java:174)
E/MethodChannel#multi_image_picker(22324): 	at android.app.ActivityThread.main(ActivityThread.java:7356)
E/MethodChannel#multi_image_picker(22324): 	at java.lang.reflect.Method.invoke(Native Method)

Smartphone:

  • OS: Android 10 (SDK 29)
  • Version: 1.0.0-alpha03
@agnoam agnoam added the bug label Oct 6, 2020
@betranthanh
Copy link

It works for me:
Just open the AndroidManifest.xml file, add this attribute to the application tag
android:requestLegacyExternalStorage="true"

@sangcomz sangcomz self-assigned this Jan 6, 2021
@andesappal
Copy link

andesappal commented Sep 30, 2021

It works for me: Just open the AndroidManifest.xml file, add this attribute to the application tag android:requestLegacyExternalStorage="true"

Hi thanks for the tip. Is this the main/AndroidManifest.xml or profile/AndroidManifest.xml? Where exactly in the file should I paste your recommended attribute? Thanks! @betranthanh

@andesappal
Copy link

That didn't work for me, I still get 'Permission denied' when trying to access my own phone's gallery. I placed it under <application <activity ... >>

@nguyenvanan18031993
Copy link

It works for me: Just open the AndroidManifest.xml file, add this attribute to the application tag android:requestLegacyExternalStorage="true"

Hi Be,
That didn't work for me, I still get 'Permission denied' when trying to access my own phone's gallery.

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

No branches or pull requests

5 participants