Most active commenters
  • deng(3)

←back to thread

410 points morsch | 13 comments | | HN request time: 1.36s | source | bottom
1. thombles ◴[] No.43983191[source]
This is also why the official SyncThing Android app stopped being distributed. There is a fork but it's not available on the Play Store.
replies(2): >>43983226 #>>43983745 #
2. deng ◴[] No.43983226[source]
The problem with the SyncThing Android app is that it's just a wrapper around SyncThing, which is a Go library, but SAF does not give you simple file descriptors you can use in native code. Instead, you get "content://" URLs, and you need a Java/Kotlin bridge to convert these to file descriptors. That would need to be done in SyncThing itself (EDIT: or some other trickery, because it seems like syncthing-fork made it work somehow).

However, AFAIK, this problem would not apply to the NextCloud app.

replies(2): >>43983610 #>>43984600 #
3. treyd ◴[] No.43983610[source]
> and you need a Java/Kotlin bridge to convert these to file descriptors.

Do you need it in these languages or could you use anything that can make binder calls?

replies(2): >>43983719 #>>43986872 #
4. deng ◴[] No.43983719{3}[source]
To my knowledge you cannot access SAF through binder, for sure not officially.
replies(1): >>44003985 #
5. fsh ◴[] No.43983745[source]
The fork is in the play store and works fine for me on Android 15: https://play.google.com/store/apps/details?id=com.github.cat...

I was a bit surprised that the official client suddenly disappeared though.

replies(3): >>43983958 #>>43985792 #>>43991945 #
6. deng ◴[] No.43983958[source]
From a very cursory look it seems like syncthing-fork uses ContentResolver and other stuff from SAF, so it seems they made it work.

The official maintainer of syncthing-fork indeed stopped publishing to Google Play, but it seems some other guy is doing that now for him.

7. izacus ◴[] No.43984600[source]
You can get simple file descriptors for SAF, but you do need to ask for them via Java APIs.
replies(1): >>43989765 #
8. JeremyNT ◴[] No.43985792[source]
> I was a bit surprised that the official client suddenly disappeared though.

Here is when syncthing dropped the official Android client [0] so you can read through their rationale and the HN response at the time.

I am not an Android developer but I do follow this space; I had the impression at the time that it really was mostly about the dev cycles that would have been required and nobody willing to do the work.

I do wonder why they don't just make the fork an official Syncthing project, it seems like the obvious solution would be to officially bless it. I can only guess the maintainer likes their independence.

[0] https://news.ycombinator.com/item?id=41895718

replies(1): >>43986694 #
9. kortilla ◴[] No.43986694{3}[source]
Well they also probably don’t want the reputation hit if the fork ends up doing some kind of rug pull.
10. charcircuit ◴[] No.43986872{3}[source]
You need it in the same sense you need to load the system's vulkan driver. System libraries don't have more permissions, but it's going to be extra work to reimplement and your code may break on different versions or devices.
11. apitman ◴[] No.43989765{3}[source]
And it's only one file at a time, right? ie you can't give your native code access to a directory.
12. BitPirate ◴[] No.43991945[source]
The play store version isn't updated anymore. You should switch to F-Droid.
13. treyd ◴[] No.44003985{4}[source]
How are the calls made?