mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-01 13:20:16 +02:00
add Permissions for android 10 and below
This commit is contained in:
@@ -393,8 +393,11 @@ class AppsProvider with ChangeNotifier {
|
||||
void moveObbFile(File file, String appId) async {
|
||||
if(!file.path.toLowerCase().endsWith('.obb')) return;
|
||||
|
||||
// REQUEST_INSTALL_PACKAGES is required to access Android/obb
|
||||
// But it seems impossible to check if obb access has been explicitly granted
|
||||
// TODO: Does not support Android 11+
|
||||
if ((await DeviceInfoPlugin().androidInfo).version.sdkInt <= 29) {
|
||||
await Permission.storage.request();
|
||||
}
|
||||
|
||||
String obbDirPath = "/storage/emulated/0/Android/obb/$appId";
|
||||
Directory(obbDirPath).createSync(recursive: true);
|
||||
|
||||
|
Reference in New Issue
Block a user