Closed Catfriend1 closed 5 years ago
this would be a great option and very useful
The button "run now regardless of run conditions" should go to...
Status tab or
Action within permanent Notification
This will be released shortly on GitHub (RC) and GPlay (BETA CHANNEL). Please provide feedback if it works, so we can release it to ALL users. Thank you :-).
@felixwiemuth @nelsonblaha @grwlf @sephore @ymage @rubenbe @sojusnik @vontrapp @alok0 @Mannshoch
@Zaijo : This should also solve your problem described in syncthing 1329. @mehrdadn : You can now force-start and force-stop Syncthing regardless of run conditions with one click. ref syncthing 1309.
@codethief : Hi there, could you please try and tell me if this solves your hotspot problem conveniently enough?
@Zaijo : This should also solve your problem described in syncthing 1329. @mehrdadn : You can now force-start and force-stop Syncthing regardless of run conditions with one click. ref syncthing 1309.
@Catfriend1 Is this going to be merged to the main repo? I'm quite lost in all these forks.
This would require the status tab (Major code change) to be merged first... I guess no at the moment. Which other forks exist in parallel? I didn't know that.
@Catfriend1: Thanks for pointing me to your fork and the feature you added here! (For future reference, the "hotspot issue" he was referring to is this one) Unfortunately, I'm new to your fork. How would I go about installing it without losing my current Syncthing-Android settings? As far as I can see, the backup option in the Android app is disabled?
On a completely different note, seeing that you're maintaining a build channel for F-Droid, how long does it typically take for the builds there to get published to F-Droid?
@codethief: In the official app, the run conditions need to be adjusted so that Syncthing runs. You'll then have the backup option available and can import your settings to STF.
F-Droid builds usually take longer, but I see no hurry why you should need the most recent wrapper version instantly. If this is exceptionally necessary, you could export your settings from the fdroid STF and e.g. run the GitHub release STF to import them. Nowadays, being one or two minor releases of the Syncthing v1.x behind isn't dramatic ;)
@codethief: In the official app, the run conditions need to be adjusted so that Syncthing runs. You'll then have the backup option available and can import your settings to STF.
I had done precisely this but after reading your message, I tried again and it turns out it takes a few seconds for the option to become available again. (Probably until Syncthing has actually fired up.) Thank you!
Also, now that I've installed your fork I gotta say I really like it! I think I'll keep on using it. Thanks for all the effort you're putting into it!
As for my original issue, I wouldn't exactly say enforcing startup is a convenient option to solve it because I still have to think of doing that manually (×) but at least it is an option to begin with, i.e. there is at least some way to work around the malfunctioning run conditions.
Any idea, though, why the "flight mode" / "run without network connection" option doesn't do the trick in my case?
(×): This is quite cumbersome in my case because I usually put my phone away when I'm at home and later have to walk back to it to fire up Syncthing. (I'm basically operating a wifi network at home which is disconnected from the internet in order to avoid distractions. The network is mainly there to synchronize files between my phone and my laptop via Syncthing, to send music to my speakers via DLNA et cetera.)
@codethief I know why it's recognizing the Hotspot. Android categorizes your network connections and detects internet availabilty on top. Those categories are reporter to Syncthing-Fork. So if Android considers hotspot as mobile data the app cannot do a better detection. Plus, there are hotspots with and without mobile data underlying. So getting the feature to be convenient in all common hotspot use cases would be as great as also impossible with the current API.
@Catfriend1 You mean, the reason Syncthing is not recognizing the hotspot is that Android doesn't report it as such because it's not connected to the internet?
@codethief yes, correct.
@Catfriend1 I have to thank you once again, the "force start" button has proven to be very useful – not just for when I connect to a wifi network that's not connected to the internet but also when there's no such network to begin with and I have to use my phone as a hotspot for my laptop. In this case, Syncthing doesn't fire up, either, but after manually starting it, my laptop and my phone synchronize beautifully.
Would there be a way for Syncthing to recognize when the phone's hotspot feature is enabled? I just read your earlier message again (regarding my hotspot at home):
I know why it's [not] recognizing the Hotspot. Android categorizes your network connections and detects internet availabilty on top. Those categories are reporter to Syncthing-Fork.
So, does that mean that Android can also report the category of "connections to networks that are not connected to the internet" to Syncthing? Wouldn't this solve all of the above problems or am I misunderstanding something?
Well, the report from Android of "no Internet connection" is the run condition "flight mode". We can't get more from Android :-/...
Oh :(
But maybe one could do a manual network scan every other minute or so to detect whether any IPs in the private IP address range are reachable?
I think that's the wrong way, background network queries/scans aren't allowed by Google policies as you would then have to use FCM which is impossible in the hotspot case... Sorry, but I can't imagine a possibility to do it "right" with given Android "best practices" atm. I also remember the times in the past doing ping scans with Tasker, since Android 6?.x it ceased working when display was off.
Run conditions - Button "Sync now for 5 minutes"