Showing results for 
Search instead for 
Did you mean: 
Update: Find information on Dropbox support during COVID-19 here
Showing results for 
Search instead for 
Did you mean: 

Syncing on Background - Best Practice

Check S. New member | Level 1
New member | Level 1


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.


1 Reply 1

Re: Syncing on Background - Best Practice


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.:

Alternatively, you can use the Core API, which may be more straightforward if you just need to upload/download a single file:

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?