Add Export/Import Functionality for User Configuration
How to use GitHub
- Please use the 👍 reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Is your feature request related to a problem? Please describe.
Currently, there is no way for users to export or import their configuration, including auto-upload folder settings, two-way-sync folders, user preferences, and other personalized settings. This makes it difficult to migrate settings across devices or for testing purposes.
Imagine you purchase a new device and want to transfer your exact app configuration from your old device, especially for settings that are not stored on the server. Alternatively, as a user, you may want to test a new QA APK without having to manually reconfigure it.
Describe the solution you'd like
Implement a two-way export/import mechanism for user configurations and preferences. This should include:
Auto-upload folder configurations User preferences (global pause state, two-way-sync configs, gridMode, theme) Other relevant configuration data
Technical Details:
Use JSON for export and import. Consider versioning the JSON structure to handle future changes without breaking backward compatibility. Include a "version" field at the top level of the exported JSON.
Data format:
{
"version": "1.0",
"userPreferences": {
"lastDisplayedAccountName": "[email protected]",
"theme": "dark",
"gridMode": true
},
"autoUploadFolders": [
{
"folderName": "FolderA",
"path": "/storage/emulated/0/FolderA"
},
{
"folderName": "FolderB",
"path": "/storage/emulated/0/FolderB"
},
{
"folderName": "FolderC",
"path": "/storage/emulated/0/FolderC"
}
],
"twoWaySync": {
"enabled": true,
"lastSyncTimestamp": 1694010000000
}
}
Implementation:
Export: Serialize user settings into a JSON object and save it as a file.
Import: Parse the JSON file, validate its version, and update user settings accordingly.
Use kotlinx.serialization
Backward Compatibility:
When adding new settings in the future, maintain default values if the imported JSON does not contain them. Validate JSON schema to ensure corrupted or partially-complete files don’t break the app.
@tobiasKaminsky @jancborchardt