Permission is required to read External Storage. Here is a gist as I do it:

Gist

But the problem is that during execution it ignores it. In the manifesto also prescribed.

<uses-permission android:name="android.permissions.READ_EXTERNAL_STORAGE"/> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> 

I do not understand what is wrong ...

    2 answers 2

    Use android.permissions_group.STORAGE for 6.0 and above, or additionally request "android.permissions.WRITE_EXTERNAL_STORAGE".

    • android.permissions.WRITE_EXTERNAL_STORAGE - Helped) Thank you) - Nikita Shavrin

    In Android 6.0, Runtime Permission has appeared.

    And starting with this version, some dependencies need not only be described in the manifest, but also requested permission for them during the execution of the program.

    Official documentation: https://developer.android.com/training/permissions/requesting.html Article in Russian: https://habrahabr.ru/post/278945/