java.lang.SecurityException

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

tip

You need the permission android.permission.READ_EXTERNAL_STORAGE. Write on the Android Manifest

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.

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

  • GitHub comment 16#159564966
    via GitHub by jkwiecien
    ,
    • java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media/102 from pid=18439, uid=10281 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission() at android.os.Parcel.readException(Parcel.java:1540) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185) at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:148) at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:689) at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1088) at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:927) at android.content.ContentResolver.openInputStream(ContentResolver.java:652) at pl.aprilapps.easyphotopicker.EasyImage.pickedPicture(EasyImage.java:197) at pl.aprilapps.easyphotopicker.EasyImage.onPictureReturnedFromGallery(EasyImage.java:297) at pl.aprilapps.easyphotopicker.EasyImage.handleActivityResult(EasyImage.java:244) at pl.aprilapps.easyphotopicker.sample.MainActivity.onActivityResult(MainActivity.java:103) at android.app.Activity.dispatchActivityResult(Activity.java:6475) at android.app.ActivityThread.deliverResults(ActivityThread.java:3970) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4017) at android.app.ActivityThread.access$1400(ActivityThread.java:172) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1471) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5832) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)

    Users with the same issue

    iridic
    157 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    filipebatista
    12 times, last one,
    229 more bugmates