Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "roaming" option to run conditions (fixes #177) #441

Merged
merged 7 commits into from
Jul 11, 2019

Conversation

Catfriend1
Copy link
Owner

@Catfriend1 Catfriend1 commented Jul 11, 2019

Purpose:

Testing:

  • Theoretically works on the emulator at commit ea71f11 (AVD 9.x). But isn't verifyable if it works correctly in real life as it depends in which order and if android sends the CONNECTIVITY_ACTION in ConnectionManager.

@Catfriend1 Catfriend1 added this to the 1.2.1 milestone Jul 11, 2019
@Catfriend1 Catfriend1 self-assigned this Jul 11, 2019
@Catfriend1
Copy link
Owner Author

So there's a problem until here: The Network(Broadcast)Receiver doesn't fire if mobile data connection changes from roaming to non-roaming (or back). Roaming detection itself and stopping SyncthingNative works already.

@Catfriend1 Catfriend1 merged commit bf161ec into master Jul 11, 2019
@Catfriend1 Catfriend1 deleted the 20190711-fixIssue177-roaming branch July 11, 2019 16:00
@Catfriend1
Copy link
Owner Author

@balihb @NicoWeio @sobotkami @jangrewe

Hi all together :-).

I've added a new run condition "run while roaming" which can be used to disabled syncthing when the phone enters roaming state. Unfortunately, I can't test this myself. Playing around with the Android emulator discovers that it might /potentially/ not work as expected even if the code in place looks right.

Here's hat I did:

  1. Unchecked run condition "run while roaming"
  2. Emulated 3G mobile data connection with the cellular profile "Home"
  3. Syncthing runs - that's fine.
  4. Emulated the cellular profile "roaming" for data
  5. !! Syncthing still runs, the BroadcastReceiver's action doesn't fire on the Android side (ConnectivityManager.CONNECTIVITY_ACTION). == So this seems to NOT work.
  6. Switch cell profile emulation to "Home", then to "Searching", then to "Roaming"
  7. Syncthing stops running - that's the behaviour we want and fine.
  8. Switch cell profile emulation to "Roaming", then to "Searching", then to "Home"
  9. Syncthing starts running - that's the behaviour we want and fine.

I would REALLY appreciate if someone of you could provide me feedback if the new run condition works and Syncthing immediately(!) stops when entering roaming while the setting is unchecked.

I'll put up a BETA release on Google Play soon, so you can just subscribe to the OPEN BETA channel and grab it. GitHub will also get a BETA on the releases page to download the APK directly.

Thank you in advance.

Kind regards,
Catfriend1

@Catfriend1
Copy link
Owner Author

Catfriend1 commented Jul 11, 2019

The new release can be downloaded here:
https://github.com/Catfriend1/syncthing-android/releases/tag/rc1.2.0.6

(and on GPlay BETA channel)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "roaming" option to run conditions
1 participant