java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=22131, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:33233 flg=0x1 }} to activity {com.example.jijoabraham.informe/com.example.jijoabraham.informe.Sales}: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=2525, uid=10347 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

Android SDK 23 introduced a new way to handle permissions, so as a temporary workaround you can set it to build for SDK below 23. As a permanent solution you have to ask user during runtime for permissions with checkSelfPermission() or requestPermissions()

Solutions on the web

via Stack Overflow by jijo
, 11 months ago
Failure delivering result ResultInfo{who=null, request=22131, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:33233 flg=0x1 }} to activity {com.example.jijoabraham.informe
via Stack Overflow by Elia D&#39;Amato
, 1 year ago
Failure delivering result ResultInfo{who=null, request=1234, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:1404 flg=0x1 VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} }} to activity
via Stack Overflow by luke
, 8 months ago
Failure delivering result ResultInfo{who=null, request=3, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/video:21079 flg=0x1 }} to activity {com.example.luke.upload/com.example.luke.upload.UploadActivity
via Stack Overflow by Daksh Agrawal
, 6 months ago
Failure delivering result ResultInfo{who=null, request=3, result=-1, data=Intent { dat=content://media/external/video/media/62712 flg=0x1 (has extras) }} to activity {com.dakshansh.partytimevendorsapp/com.dakshansh.partytimevendorsapp.VenueListingActivity4}: java.lang.NullPointerException: Attempt to get length of null array
via Stack Overflow by Wei Xiong
, 3 months ago
Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://media/external/images/media/526 flg=0x1 (has extras) }} to activity {henderson.application/henderson.application.Application_admin_1
via Stack Overflow by Jose Tovar
, 6 months ago
Failure delivering result ResultInfo{who=null, request=500, result=-1, data=Intent { dat=content://media/external/video/media/3670 flg=0x1 (has extras) }} to activity {com.example.inventiba.topfived/com.example.inventiba.topfived.ListaVista}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.io.FileInputStream.read(byte[])' on a null object reference
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=22131, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:33233 flg=0x1 }} to activity {com.example.jijoabraham.informe/com.example.jijoabraham.informe.Sales}: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=2525, uid=10347 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
at android.os.Parcel.readException(Parcel.java:1620)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)
at android.content.ContentResolver.query(ContentResolver.java:502)
at android.content.ContentResolver.query(ContentResolver.java:445)
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.jijoabraham.informe.Sales.onActivityResult(Sales.java:143)
at android.app.Activity.dispatchActivityResult(Activity.java:7137)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4921)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4968)
at android.app.ActivityThread.access$1600(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1849)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Users with the same issue

18 times, 13 hours ago
Once, 18 hours ago
4 times, 3 days ago
2 times, 1 week ago
Once, 3 weeks ago

Write tip

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