mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-31 13:33:28 +01: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 { |   void moveObbFile(File file, String appId) async { | ||||||
|     if(!file.path.toLowerCase().endsWith('.obb')) return; |     if(!file.path.toLowerCase().endsWith('.obb')) return; | ||||||
|  |  | ||||||
|     // REQUEST_INSTALL_PACKAGES is required to access Android/obb |     // TODO: Does not support Android 11+ | ||||||
|     // But it seems impossible to check if obb access has been explicitly granted |     if ((await DeviceInfoPlugin().androidInfo).version.sdkInt <= 29) { | ||||||
|  |       await Permission.storage.request(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     String obbDirPath = "/storage/emulated/0/Android/obb/$appId"; |     String obbDirPath = "/storage/emulated/0/Android/obb/$appId"; | ||||||
|     Directory(obbDirPath).createSync(recursive: true); |     Directory(obbDirPath).createSync(recursive: true); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user