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()


Samebug tips5

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

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()

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.


Solutions on the web45625

Solution icon of stackoverflow
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

Solution icon of stackoverflow
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

Solution icon of stackoverflow
Failure delivering result ResultInfo{who=null, request=2, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:53790 flg=0x1 }} to activity {com.ummahtalk.network

Solution icon of stackoverflow
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

Solution icon of stackoverflow
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

Solution icon of stackoverflow
via Stack Overflow by Unknown author, 1 year ago
Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://media/external/images/media/7963 (has extras) }} to activity {com.progrmor.tombstone.android/com.progrmor.tombstone.android.AndroidLauncher

Solution icon of stackoverflow
Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://media/external/images/media/38945 }} to activity {info.androidhive.materialdesign/info.androidhive.materialdesign.formpesankue.PesanKueAll

Solution icon of stackoverflow
Failure delivering result ResultInfo{who=null, request=2, result=-1, data=Intent { dat=content://media/external/images/media/47 }} to activity {com.location.abc.kharcha/com.location.abc.kharcha.Expense_main}: java.lang.SecurityException: Permission

Solution icon of stackoverflow
Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://media/external/images/media/2501 (has extras) }} to activity {com.example.dothis.imagefeed/com.example.dothis.imagefeed.MainActivity

Solution icon of stackoverflow
Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://media/external/images/media/41 }} to activity {com.example.himanshu.imageviewintent/com.example.himanshu.imageviewintent.MainActivity

Stack trace

  • 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.app.ActivityThread.deliverResults(ActivityThread.java:4925) 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 java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: 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) ... 9 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Once, 8 months ago
37 times, 1 year ago
3 times, 1 year ago
3 times, 1 year ago
194 times, 1 month ago
234 more bugmates