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 Denial: opening provider com.android.gallery3d.provider.GalleryProvider #8

Closed
korniltsev opened this issue Aug 22, 2013 · 9 comments
Assignees
Labels

Comments

@korniltsev
Copy link

2013-08-22 12 10 32

Caused by: java.lang.SecurityException: Permission Denial: opening provider com.android.gallery3d.provider.GalleryProvider from ProcessRecord{411c6770 20120:com.beanie.imagechooserapp/u0a10161} (pid=20120, uid=10161) requires com.google.android.gallery3d.permission.GALLERY_PROVIDER or com.google.android.gallery3d.permission.GALLERY_PROVIDER
at android.os.Parcel.readException(Parcel.java:1425)
at android.os.Parcel.readException(Parcel.java:1379)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:2545)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4648)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2054)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1101)
at android.content.ContentResolver.query(ContentResolver.java:356)
at android.content.ContentResolver.query(ContentResolver.java:315)
at com.beanie.imagechooser.api.BChooser.getAbsoluteImagePathFromUri(BChooser.java:112)
at com.beanie.imagechooser.api.ImageChooserManager.processImageUri(ImageChooserManager.java:216)
at com.beanie.imagechooser.api.ImageChooserManager.processImageFromGallery(ImageChooserManager.java:252)
at com.beanie.imagechooser.api.ImageChooserManager.submit(ImageChooserManager.java:198)
at com.beanie.imagechooserapp.ImageChooserActivity.onActivityResult(ImageChooserActivity.java:120)
at android.app.Activity.dispatchActivityResult(Activity.java:5293)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3443)
... 11 more

@korniltsev
Copy link
Author

I was trying to find workaround for taking pictures from picase and got the same exception
Then I found the lib and it crashes too

Detailed message says
Permission Denial: opening provider com.android.gallery3d.provider.GalleryProvider from ProcessRecord{40fe4f08 19199:drug.vokrug/u0a10153} (pid=19199, uid=10153) requires com.google.android.gallery3d.permission.GALLERY_PROVIDER or com.google.android.gallery3d.permission.GALLERY_PROVIDER

However setting the permission does not help

@coomar2841
Copy link
Owner

Looks like a bug on Android:

https://code.google.com/p/android/issues/detail?id=47741

But, will have a look at it.

@coomar2841
Copy link
Owner

@kurganec Could you check this solution and see if it works? I can't reproduce the problem on my phone. See the answer with the most upvotes.

@korniltsev
Copy link
Author

@coomar2841 there is no way I can set singleTask on my activity.

@coomar2841
Copy link
Owner

Hmm... Does this happen only on this particular device? Or you can reproduce on other devices/oses as well? I would need to reproduce this problem on one of my devices, and then I could look into a workaround. I have a Nexus S running 4.2.2 and a Galaxy Nexus on 4.3

@ghost ghost assigned coomar2841 Sep 8, 2013
@wlrover
Copy link

wlrover commented Oct 15, 2014

Guys, have you found a solution for this issue as I am facing the same problem when I am trying to share a file into my app using gallery app. I don't have "singleTask" in my manifest.

@korniltsev
Copy link
Author

Still no solution

@AndroidDeveloperLB
Copy link

Only possible solutions that I can think of are:

  1. The easy solution: add those permissions . not sure why it doesn't work for me.
  2. the hard solution: save the needed data somewhere (depends on what you need), and also have a fallback to reading from files paths.
    I'm not sure, but maybe you don't even need to get the metadata (orientation etc...) , and using the ExifInterface is enough (depending if it works and what are your needs).

I think one way to test it is by taking an image from Picasa, using a Uri. the first few times you access it, it will work fine, but soon afterwards, you have a good chance of getting an exception.

@coomar2841
Copy link
Owner

This should be fixed now. Please check and re-open if it's still an issue.

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

4 participants