ARTICLE AD BOX
I'm asking for the MANAGE_EXTERNAL_STORAGE permission:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" tools:ignore="AllFilesAccessPolicy" /> <application ...And I'm calling this function from the Activity's onCreate:
@RequiresApi(Build.VERSION_CODES.R) fun checkStoragePermission() { Manifest.permission.MANAGE_EXTERNAL_STORAGE.let { val permission = ContextCompat.checkSelfPermission(this,it) Log.d("--- MusinK ---", "MANAGE_EXTERNAL_STORAGE: $permission") if (permission != PackageManager.PERMISSION_GRANTED) { Log.d("--- MusinK ---", "requesting...") requestPermissions(this, arrayOf(it), 7) } } }The value for permission is -1 and requesting... is logged, but there is no corresponding user dialog. What am I missing?
Note: I don't care for Google's policies. This app won't go to the PlayStore. I have my phone connected via USB, and when I hit run in Android Studio, I want to see the dialog.
I have deleted the app several times already; thus, this is not caused by previous denials.
