Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Check S.
11 years agoNew member | Level 1
Syncing on Background - Best Practice
Hello,
I'd like to implement simple sync functionality into my App. The goal is to read JSON data from file (On Dropbox) and update my SQLite data and vice versa. Users must be allowed to use App during sync process. I consider to use Dropbox Sync API and call syncing from (Intent)Service.
I see a few problems which could appear:
1.) App is minimized (paused) while syncing
2.) App is closed (killed) while syncing
3.) In some cases, sync scenario needs User input (for example: "Do you want to replace data in your device?" dialog)
Is there any "Best practice" or recommendation how to implement this functionality? It would be greatly appreciated if somebody could help with this problem.
Tom
1 Reply
Replies have been turned off for this discussion
- Greg-DB11 years ago
Dropbox Community Moderator
If you're using the Sync API, you should work through the tutorial to see how it's recommended apps use the API to upload and download files, use listeners, etc.:
https://www.dropbox.com/developers/sync/start/android
Alternatively, you can use the Core API, which may be more straightforward if you just need to upload/download a single file:
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!