Using Go on Mobile: Discussion About Alternatives

This post is a copy of https://github.com/syncthing/syncthing-android/issues/909 where a discussion began but that was probably not the right place for discussions.

===

I am aware of the various problems, issues and discussion about the limitation of using an sdcard with Syncthing. The problem was moved upward to the Go team: https:// github.com/golang/go/issues/10588.

That issue was around without any answer or progress for 2 years. After politely asking the team for an honest answer on what was going on a member of the team replied:

Unfortunately there’s no one on the Go team actively supporting x/mobile at the moment.

I think this answer might have serious implication for this project and others relying on the goLang on mobile. The problem of the sdcard is already unsolvable, and there is no hope no one will ever fix it for the incoming years.

But this might only be one of the problems: “no one on the Go team actively supporting x/mobile at the moment.” means that as soon new features or restrictions comes from the mobile world no one will take care of them on the Go Team.

Talking about problem anticipation I’d like to ask this to the team members: Do you think is still safe to continuing support Go for the mobile environments?

It is probably convenient because you write your code once and then you can export it for mobiles or other platforms. But is it safe? No one is supporting the mobile platforms…

Don’t you think it is a good time to have a discussion and look for alternatives before a downfall of other problems might arise?

The maintenance or lack of maintenance of x/mobile doesn’t have that much of an impact on us, as we don’t use it. I’m guessing it came up as a side point in discussing Go on Android in general.

That said, Syncthing (the Go implementation) is not mobile optimized. The SD card access thing is one stumbling block, but far from the only one. This is a good reason to look at an alternative, mobile-native implementation.

There are alternatives, too, they may just need some help to achieve feature parity etc.

1 Like

The only alternative to using Go is that we reimplement Syncthing in Java or C++. That would be a huge effort, and it doesnt seem like anyone wants to do that (I certainly dont have enough time).

There is an alternative Syncthing Android app that is completely written in Java, but it’s missing a lot of features, and development isnt very active:

1 Like

Is it possible to make a “go wrapper” for C++ code (using Android NDK) ? NDK should provide an access to external storage.

Syncthing Android app is not an alternative at all, it is not a cloud(which can sync), it’s a browser. Alternative is Resilio, but it’s closed source…