You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When launching the app for the first time, we use LiveGlobalStore._dbFile to find where the sqlite database file should be created at. This varies by platform, and we need to determine a best fit for each.
[u]se ["Library/Application Support"] to store all app data files except those associated with the user’s documents. For example, you might use this directory to store app-created data files, configuration files, templates, or other fixed or modifiable resources that are managed by the app.
For Android, it is more ambiguous, as I couldn't find an official recommendation. However, there is getDatabasePath intended to be paired with openOrCreateDatabase that we don't use. The path would look like /data/user/0/com.zulip.flutter/databases/. However, path_provider doesn't have a binding for getDatabasePath.
The other options are:
path_provider's getApplicationSupportDirectory (Flutter's PathUtils.getFilesDir -> getFilesDir -> empirically /data/data/com.zulip.flutter/files/, or /data/user/0/com.zulip.flutter/files from testing)
path_provider's getApplicationDocumentsDirectory (Flutter's PathUtils.getDataDirectory -> getDir with MODE_PRIVATE).
Neither requires additional permission to be created, and both refers to private storage.
We might also take the path on Linux in to consideration, while it is not a target platform.
We get "${XDG_DATA_HOME:-~/.local/share}/com.zulip.flutter/" for getApplicationSupportDirectory and ``xdg-user-dir DOCUMENTS -> e.g. ~/Documents for `getApplicationDocumentsDirectory`. The latter is clearly not a fit, and the former is more reasonable.
The text was updated successfully, but these errors were encountered:
PIG208
added
a-Android
Issues specific to Android, or requiring Android-specific work
a-iOS
Issues specific to iOS, or requiring iOS-specific work
labels
Feb 4, 2025
When launching the app for the first time, we use
LiveGlobalStore._dbFile
to find where the sqlite database file should be created at. This varies by platform, and we need to determine a best fit for each.For iOS, it is suggested to
For Android, it is more ambiguous, as I couldn't find an official recommendation. However, there is
getDatabasePath
intended to be paired withopenOrCreateDatabase
that we don't use. The path would look like/data/user/0/com.zulip.flutter/databases/
. However,path_provider
doesn't have a binding forgetDatabasePath
.The other options are:
path_provider's
getApplicationSupportDirectory
(Flutter'sPathUtils.getFilesDir
->getFilesDir
-> empirically /data/data/com.zulip.flutter/files/, or/data/user/0/com.zulip.flutter/files
from testing)path_provider's
getApplicationDocumentsDirectory
(Flutter'sPathUtils.getDataDirectory
->getDir
withMODE_PRIVATE
).Neither requires additional permission to be created, and both refers to private storage.
We might also take the path on Linux in to consideration, while it is not a target platform.
We get
"${XDG_DATA_HOME:-~/.local/share}/com.zulip.flutter/"
forgetApplicationSupportDirectory
and ``xdg-user-dir DOCUMENTS-> e.g. ~/Documents
for `getApplicationDocumentsDirectory`. The latter is clearly not a fit, and the former is more reasonable.The text was updated successfully, but these errors were encountered: