amake / orgro

An Org Mode file viewer for iOS and Android
https://orgro.org
GNU General Public License v3.0
452 stars 21 forks source link

File content stale with Dropbox on Android #63

Open pshangov opened 2 years ago

pshangov commented 2 years ago

I cannot find a way to update a file from Dropbox that has been updated since it was first opened. Saw https://github.com/amake/orgro/issues/12 but still not clear how this is supposed to work.

amake commented 2 years ago

12 is specific to iOS.

The last time I looked at Dropbox on Android it did not support the storage access framework (SAF), meaning you couldn't open files "from Orgro"; you could only go to Dropbox and then "open in Orgro". This is evidenced by e.g. this long-ignored request that Dropbox support SAF.

However now that I look again with the latest version of Dropbox (274.2.2) I see that they seem to have added support. In other words Dropbox now does appear as a source in the file picking intent:

android-1649555206

I have not seen this before, so I can't speak to the quality of Dropbox's support for SAF. As I understand it, Dropbox is responsible for making sure that files are up to date before handing them off to the requesting application. So if you are finding files to be stale then I think it's Dropbox's fault and there's really nothing I can do about it.

pshangov commented 2 years ago

I have been using https://github.com/orgzly/orgzly-android previously, which uses the same file picker. It too won't automatically detect changes to a file, but has a "Sync" button within the app itself to request a file to be refreshed.

amake commented 2 years ago

Orgzly embeds the Dropbox SDK, which gives it that capability. I don't use the Dropbox SDK because I already support the universal file access APIs on iOS and Android, and I don't think Dropbox merits such special treatment.