Open interacsion opened 1 year ago
Labeling for further insight from the team
The implementation of this plugin has changed over time for Android as Android APIs it used to use were deprecated; it may be that the current mapping to underlying APIs is no longer ideal.
We can investigate whether there are better options, although any changes would need to be made carefully (likely as opt-in) to avoid data loss.
Which API should I use then? getApplicationDocumentsDirectory
, as the documentation says, even though its result on android isn't very appropriate?
I use getApplicationDocumentsDirectory()
on iOS and getExternalStorageDirectory()
on Android.
I use
getApplicationDocumentsDirectory()
on iOS andgetExternalStorageDirectory()
on Android.
Can you explain what the reason for that is?
I am developing an app (on android, but ios needs to be supported as well) and I need to save user taken images.
As I am developing on android, I was looking for
path_provider
methods that get the app's local storage (as that's where I need to save them, in android at least), and there seems to be two methods that return a directory in the local storage:getApplicationDocumentsDirectory
andgetApplicationSupportDirectory
.now, here's where I get confused:
getApplicationDocumentsDirectory
returns/data/data/com.example.app/app_flutter/
, which seems like an odd location to save app data; why is it in a flutter specific directory, and not a standard android location?on the other hand,
getApplicationSupportDirectory
returns/data/data/com.example.app/files/
, which seems much more correct, though its dart doc saysYour app should not use this directory for user data files.
So, is there an explanation to the documents directory's odd location? or perhaps the support directory's doc is misleading?