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


8 months ago
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.


8 months ago
Expert tip

Solutions on the web1242

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=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 web
via androidside.com by Unknown author, 1 year ago
Failure delivering result ResultInfo{who=null, request=0, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:1078 flg=0x1 }} to activity {com.example.aa.testim5/com.example.aa.testim5.MainActivity}: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0

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

Solution icon of web
via androidside.com by Unknown author, 1 year ago
Failure delivering result ResultInfo{who=null, request=0, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:1078 flg=0x1 }} to activity {com.example.aa.testim5/com.example.aa.testim5.MainActivity}: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0

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

Solution icon of stackoverflow
via Stack Overflow by Jose Tovar
, 4 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

Solution icon of stackoverflow
Failure delivering result ResultInfo{who=null, request=123, result=-1, data=Intent { dat=content://com.android.providers.downloads.documents/document/2458 flg=0x1 }} to activity {com.moments.sevendoctors/com.moments.sevendoctors.activites.GetFiles}: java.lang.NullPointerException: Attempt to get length of null array

Solution icon of stackoverflow
Failure delivering result ResultInfo{who=android:fragment:1, request=20, result=-1, data=Intent { dat=content://com.android.externalstorage.documents/document/primary:Pictures/Facebook_edited/edited_FB_IMG_1484503689030.jpg flg=0x1 }} to activity

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, 9 months ago
37 times, 1 year ago
3 times, 1 year ago
3 times, 1 year ago
2 times, 1 month ago
238 more bugmates