do i need inform or take permissions from users if i need to write or read from application app ?
i need to know Officially and legally if Do I have to ask the user to grant me permissions either by ios or android
Future<String> get _localPath async {
final directory = await getApplicationDocumentsDirectory();
return directory.path;
}
Future<File> get _localFile async {
final path = await _localPath;
return File('$path/counter.txt');
}
// Write the file
Future<File> writeCounter(int counter) async {
final file = await _localFile;
return file.writeAsString('$counter');
}
// Read the file
Future<int> readCounter() async {
try {
final file = await _localFile;
final contents = await file.readAsString();
return int.parse(contents);
} catch (e) {
return 0;
}
}turn int.parse(contents);
} catch (e) {
return 0;
}
}
Yes, for android you need read and write permission but for iOS only read permission required, for example:
I want to read and write permission then I will modify
info.plist file in iOS
AndroidMainfest.xml file in android