-2

I already added

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

in manifest.xml, but it shows

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.selectmultipleimages_demo/com.selectmultipleimages_demo.CustomGallery_Activity}: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=5290, uid=10149 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission() exception
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
prathyusha
  • 13
  • 3

1 Answers1

1

Followed by Android Version API 23 onwards, ie Marshmallow onward you need to get run time permission to access user's confidential data. Run time permissions is clearly explained here : Requesting Permissions at Run Time

Also, this Answer shall help you to implement run time permission for the purpose of writing to the External Storage.

Community
  • 1
  • 1
OBX
  • 6,044
  • 7
  • 33
  • 77