Skip to content Skip to sidebar Skip to footer

Requires Android.permission.read_external_storage, Or Granturipermission() Error?

I think ever since the newest Android update this method: public String getPath(Uri uri) { Cursor cursor = getContentResolver().query(uri, null, null, null, null); cursor.m

Solution 1:

You need to hold the READ_EXTERNAL_STORAGE or WRITE_EXTERNAL_STORAGE permission. That involves:

  • putting the appropriate <uses-permission> element in your manifest, and

  • if your targetSdkVersion is 23 or higher, requesting the permission at runtime from the user, as those permissions are dangerous

Post a Comment for "Requires Android.permission.read_external_storage, Or Granturipermission() Error?"