I am writing a flutter app for Android devices. I want to be able to access my apps data folder from my PC using windows explorer so I can copy data into it that my app can use. I can see the folder has been created correctly by my app when I view the sdcard folder within android studio, but not when I view the data folder using windows explorer.
I am guessing this is a permissions issue, but am not sure.
I am using path provider 1.5.1 and permission handler 4.0.0
Here is how I am getting permission to read/write from my folder:
Future<void> getPermission() async {
String path;
if (Platform.isAndroid) {
PermissionStatus permission = await PermissionHandler().checkPermissionStatus(PermissionGroup.storage);
if (permission != PermissionStatus.granted) {
await PermissionHandler().requestPermissions([PermissionGroup.storage]);
}
path = (await getExternalStorageDirectory()).path;
} else if (Platform.isIOS) {
// to be written....
}
}
I have added these lines to my AndroidManifest.xml file
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Can someone point me in the right direction please?