简体   繁体   中英

Can a android app using dropbox sync API use the cache, filesystem, files of the locally installed dropbox official app?

I have integrated the dropbox sync api with my native android app. My question is regarding the offline usage of cache, filesystem and files from the official dropbox app.

Setup:-

  1. Device is android phone
  2. Official dropbox app is installed
  3. API used is the sync API

Scenario 1

If my android device is in aeroplane mode and my app is also running in background as a service. A new file is added to the dropbox app. This new file cannot be synced to the dropbox server because there is no network connection. Although my service has registered DbxFileSystem.SyncStatusListener I do not get a callback. Is it because my app does not share the filesystem of the locally installed dropbox app and my app and the dropbox app are treated as two separate clients?

Scenario 2

A new file is uploaded to the dropbox server, and it is immediately downloaded on the locally installed dropbox app by marking it as favorite. Then I put the android device in aeroplane mode. Then I launch the app. On this newly added DbxFile I call the getReadStream(). I observe that the DbxFile is not cached and attempts to connect to the network. Does it mean that I cannot use the downloaded file present in the filesystem used by the official dropbox app installed locally?

If the answer is "No the cache, filesystem and files used by my app and the official dropbox app are different and we are two separate clients for the dropbox server" then what API should I be using to achieve the behavior I want?

不,无法访问Dropbox应用的文件存储/缓存。

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