简体   繁体   中英

Dropbox Android Sync API

I'm using this API in order to read an Excel file from Dropbox. I read the file and save the rows in an ArrayList. Then I close the stream (dbxFile.close()).

It's working fine but this log messages appear a lot of times when I've already downloaded the file and I am doing another completely different task.

libDropboxSync.so(sync) sync.c:80: calling /delta...
com.dropbox.sync.android.NativeHttp Sending HTTP POST
com.dropbox.sync.android.NativeHttp HTTP POST status 200
libDropboxSync.so(sync) sync.c:86: handling /delta responses...
libDropboxSync.so(api) api.c:511: processed 0 delta entries: 0.000032 sec
libDropboxSync.so(sync) sync.c:209: sync done
... 

It is normal? I guess that Dropbox wants to have the latest version of the file, but those log messages appear and appear and it doesn't look like it's going to stop.

Thanks.

Sync API regularly fetches delta from Dropbox to keep the local and remote copy in sync. It is expected that you're seeing sync attempts.

Is this helps?

You should avoid having files open or listeners registered while your app isn't on the screen. Both are hints to the Sync API that you're actively watching for changes, and will cause it to update more frequently in the background, which consumes power. Use your onPause() method to remove listeners and close files, then use onResume() to restore them as necessary.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM