Read/write from Android/data folder with Flutter

1.3k views Asked by At

I recently decided to experiment a bit with flutter and Android development, and I'm trying to create a simple app to import and export a game saves (because you can use the file both on Android and PC, but there isn't an official sync system yet), but I'm having troubles with file management. Basically, what I would like to achieve is the following:

  • Export: the app should copy a file from the Android/data folder of the game to another location (example: download folder)
  • Import: the app should let you pick a file and then copy it to the data folder of the game

Right now I managed to ask for both storage and manageExternalStorage permissions when launching the app, but even with those I get an access denied error (errno = 3) when trying to export the file.

Is it even possible to achieve my goal? Or maybe I'm just doing something wrong with permissions?

I'll give more info about the app (for example code snippets) if you have specific requests on some aspects of it

0

There are 0 answers