require the READ_EXTERNAL_STORAGE on every device, for fetching playlists

This commit is contained in:
tibbi 2020-05-06 12:52:03 +02:00
parent 7c15b625c2
commit a8881d8b17
2 changed files with 9 additions and 1 deletions

View file

@ -7,6 +7,7 @@
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />

View file

@ -66,7 +66,14 @@ class MainActivity : SimpleActivity(), MainActivityInterface {
}
}
} else {
handlePermission(PERMISSION_READ_STORAGE) {
if (it) {
initActivity()
} else {
toast(R.string.no_storage_permissions)
finish()
}
}
}
volumeControlStream = AudioManager.STREAM_MUSIC