In my app i want to get user permission to read and write data on external storage, i have put permission tag in my manifest as below. But when installing app or running and where it requires to read or write to storage no permission is taken from user and reading and writing memory just doesn't work, until i manually go to setting-app-access and enable access to memory.
My manifest is this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="javadi60.saber.storeassistant">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:dialogTheme="@style/CustomDialog"
android:icon="@mipmap/myappicon"
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>
<activity android:name=".insertData" />
<activity android:name=".setting" />
<activity android:name=".dellAll" />
<activity android:name=".reports" />
<activity android:name=".login" />
</application>
</manifest>