Auto-sync on wifi connection



  • It would be good to have an extra option to automatically try and sync whenever the phone goes onto wifi


  • developer

    What is the use case of this? I don't know whether DAVdroid should put effort in changing the times of synchronization, Android does a good job. Maybe you can restrict mobile data (in Settings, to turn off sync on mobile networks) and set a relatively short sync interval in DAVdroid?



  • I would suggest a slightly different approach, which may help dpocock, too: How about limiting the synchronization of an account to a specific SSID? My server is not available from outside anyway, so why should DAVdroid try to sync while being mobile?



  • Thats sounds reasonable..... and is used by some mobile apps already. !



  • Not sure if it's worth it. You can just let davdroid crash or timeout on sync, no big deal.

    On 9 August 2015 12:43:50 CEST, hitam4450 notifications@github.com wrote:

    Thats sounds reasonable..... and is used by some mobile apps already. !


    Reply to this email directly or view it on GitHub:
    https://github.com/bitfireAT/davdroid/issues/590#issuecomment-129163691

    --
    Sent from my phone. Please excuse my brevity.



  • I aggree. Jut let the connection fail. However, user should not be
    bothered with this kind of errors.



  • Most enhancements are not "a big deal", but there are 3 reasons for me:

    1. It consumes energy. Yeah, not really much, but this isn't the only app on my phone.
    2. I don't like to contact servers at my office or university, even if I know even if it would support WebDAV for some strange coincidence the SSL would break.
    3. From the programmatic point of view it's not really nice to run into avoidable exceptions.

    If time is the only reason against this, I would be glad to implement this myself as an additional option if it has a chance to be merged.



  • I think this feature should be implemented at the OS level, if ever.

    • I don't understand your second point.
    • From a maintenance point of view, it's not really nice to have additional code to achieve something that was possible without it.


  • That would be nice, but I don't expect this. The second point is bad written: I didn't mean the encryption to break, but rather the client would report a failure to authenticate the server. But that wouldn't be the case, because the client doesn't enforce my custom certificate and would take the new servers certificate as well (if it's signed). Let's forget that part.
    I still think contacting the wrong server because it has the same IP isn't nice.



  • Heyho @Plunts,

    your server being behind a NAT is no problem to be solved by DAVdroid, but rather by the network layer. You could for example use IPv6 or enable port forwarding in your router.



  • I know how to configure my router, but I don't want and need my raspberry to be accessed from the internet ;) As hitam4450 mentioned, the "SSID-Feature" is implemented in other apps, too.



  • The point is: adding that "feature" to every app doesn't scale. Other apps implementing it nonetheless doesn't mean it is a good feature. Here is another solution which might fit your needs better since it keeps your server hidden from the internet:
    Give your server a DNS name which is only resolvable in your home network. Then if you're on the go, the domain will not resolve and there is no connection to a wrong server.



  • Simple workaround is to use unusual IP range on your private network. A lot of people have some 192.168.1.x networks, but if you use some big random number instead of 1, you will have no conflicts in most networks (big institutions use 10.x.x.x and most home networks some rounded N in 192.168.N.x). Also your current (foreign) router will reply that route does not exist or network is unreachable, so no timeouts, no waiting, no SSL errors. Only few small packets and barely noticable energy loss. Also VPN works better with such configurations.


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.