java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=400, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:104460 flg=0x1 }} to activity {com.example.user.cameratoserver/com.example.user.cameratoserver.MainActivity}: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=17286, uid=10038 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

You need the permission android.permission.READ_EXTERNAL_STORAGE. Write <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> on the Android Manifest

,
Expert tip

MANAGE_USERS has a protection level of signature|system, so your application must be signed with the platform key. Take a look on this https://goo.gl/nXsTvH for more information about it.

Solutions on the web

via Stack Overflow by Vivian
, 1 year ago
Failure delivering result ResultInfo{who=null, request=400, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:104460 flg=0x1 }} to activity {com.example.user.cameratoserver
via Stack Overflow by Petar
, 2 months ago
Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://com.android.contacts/contacts/lookup/667r1279-293F314353452F392D5B29474B2935.2597r2596-293F314353452F392D5B29474B2935/1296 flg=0x1 }} to activity
via Stack Overflow by Lito
, 11 months ago
Failure delivering result ResultInfo{who=null, request=234, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:49769 flg=0x1 }} to activity {com.example.formador.a42_camera
via Stack Overflow by Assem Mahrous
, 10 months ago
Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://com.google.android.apps.photos.contentprovider/-1/1/content://media/external/file/14844/ORIGINAL/NONE/827721333 flg=0x1 clip={text/uri-list U:content
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=400, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:104460 flg=0x1 }} to activity {com.example.user.cameratoserver/com.example.user.cameratoserver.MainActivity}: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=17286, uid=10038 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
at android.os.Parcel.readException(Parcel.java:1627)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:427)
at android.content.ContentResolver.query(ContentResolver.java:497)
at android.content.ContentResolver.query(ContentResolver.java:439)
at com.kosalgeek.android.photoutil.RealPathUtil.getDataColumn(RealPathUtil.java:131)
at com.kosalgeek.android.photoutil.RealPathUtil.getRealPathFromURI_API19(RealPathUtil.java:62)
at com.kosalgeek.android.photoutil.GalleryPhoto.getPath(GalleryPhoto.java:49)
at com.example.user.cameratoserver.MainActivity.onActivityResult(MainActivity.java:100)
at android.app.Activity.dispatchActivityResult(Activity.java:6490)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3794)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3841)
at android.app.ActivityThread.access$1400(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1440)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:234)
at android.app.ActivityThread.main(ActivityThread.java:5526)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)

Users with the same issue

Once, 10 months ago
23 times, 1 year ago
29 times, 1 year ago
2 times, 1 year ago
10 times, 1 year ago
256 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.