"Manual sync" automatically triggered by calendar apps, which will ignore WiFi restrictions


  • developer

    @cal said in "Manual sync" automatically triggered by calendar apps:

    BTW, one can’t select and copy text from the debug info, and using the share button “copy to clipboard” action only copies a content URL.

    DAVdroid generates a debug.txt which is accessible over a content URI (using FileProvider). Debug info is often too large for a simple string.

    If you want your “Copy to clipboard” app to read this URI and copy its content, this would have to be done in “Copy to clipboard”.

    Yes, I realize I want something that DAVdroid wasn’t intended to do. The question is if you would accept a patch that either

    1. adds a new “manual only” setting (ignore app sync requests)
    2. or changes behaviour to make “sync interval = manual only” to imply “ignore app sync requests”

    The latter is what I originally expected, and what I assume normal users who don’t know anything about how Android sync internally works would expect.

    Thanks for the offer! Currently, I’m not sure about this, because it’s another setting, which means even more complexity and maintenance and testing work.

    If other people need this feature, too, we will think about it. In the meanwhile, I suggest to … (see above).



  • OK, thanks for your responses and for the time you’ve taken. I hope someone else with the same desires will chime in. If not, then, well, good we’ve talked about it…

    Thanks for writing and maintaining DAVdroid!



  • FWIW, I found out my phone (Moto G5, still Android 7.0) does contact syncs when it feels like it:

    08-20 10:26:57.754  2902  2920 I ActivityManager: Start proc 15612:at.bitfire.davdroid:sync/u0a123 for service at.bitfire.davdroid/.syncadapter.ContactsSyncAdapterService
    08-20 10:26:57.814 15612 15612 I art     : Starting a blocking GC AddRemoveAppImageSpace
    08-20 10:26:57.817 15612 15612 W System  : ClassLoader referenced unknown path: /data/app/at.bitfire.davdroid-2/lib/arm
    08-20 10:26:57.900 15612 15612 I davdroid: Verbose logging: false; to file: false
    08-20 10:26:57.948 15612 15627 I davdroid: [PackageChangedReceiver] Package (un)installed; OpenTasks provider now available = true
    08-20 10:26:57.948 15612 15628 I davdroid: [syncadapter.SyncAdapterService] com.android.contacts sync of Account {name=contacts.vcf (me pg), type=at.bitfire.davdroid.address_book} has been initiated
    08-20 10:26:57.948 15612 15628 I davdroid: 	PARAMETER #0 = 
    08-20 10:26:58.001 15612 15628 I davdroid: [syncadapter.ContactsSyncAdapterService] Synchronizing address book: ...
    

    (fails and repeats at 10:43:32.718, 10:59:52.375 and 12:06:12.919)

    I’ts not clear what triggers this, sync interval in DAVdroid is set to manual and the phone was lying idle on the table when the sync started, I checked time and notifications sometimes but didn’t use Contacts app today.



  • @cal Hello, I experience the same problem. I have locally running a radicale Server to sync caldav and carddav. It is a small box running at my home and syncs the data. It is only reachable at home and not exposed to the internet for reasons.

    I have as well restricted davdroid only to sync when using wifi and a specific ssid.

    My Android 8.0 displays error messages in the notification area that it is not able to sync. This happens when the sync intervall is reached or I edit or create new calendar entries. This is annoying as I would guess that davdroid would ignore all sync requests from calendars and contacts when it is not using wifi and the ssid.

    I am in favor that davdroid would handle this case.

    Greetings,
    foobar.


  • developer

    @foobar Do you have multiple DAVdroid accounts?



  • I have only one davdroid account for caldav and carddav.



  • Another day, another log: Today my phone decided to do a calendar sync together with the contacts sync:

    08-21 13:27:19.404 19376 20008 I davdroid: [syncadapter.SyncAdapterService] com.android.calendar sync of Account {name=me, type=bitfire.at.davdroid} has been initiated
    08-21 13:27:19.404 19376 20008 I davdroid: 	PARAMETER #0 = ignore_settings, force, sync_extra_update_client_status
    

    Phone was laying idle on the desk, and I didn’t use calendar app today.


  • developer

    @cal Which apps do you have installed? Which calendar apps?

    Google doesn’t even know sync_extra_update_client_status… I have only fond this here: https://github.com/mmathys/gcalendar-source/blob/1ddd4ce3607496701f3fa3c46b874db23d88d3f2/smali/com/google/android/calendar/extensions/WhatsNewFactoryImpl.smali

    Seems like Google Calendar forces a “client status sync”, whatever this shall mean…

    What happens if you disable Google Calendar entirely (in Android / Apps) and use another calendar app, e.g. aCalendar+ or Business Calendar or Etar?



  • I am using the calendar app that came with my lg g6 android phone.

    It even tries to sync via davdroid (and davdroid getting the i/o-error) when on cellular even I restricted it to use only wifi with a specific ssid.


  • developer

    @foobar What happens if you disable the app that came with your phone entirely (in Android / Apps) and use another calendar app, e.g. aCalendar+ or Business Calendar or Etar?



  • @rfc2822 I am only using fdroid. So do you have any reccomendation for a free calendar.


  • developer

    @foobar For instance, Etar.



  • I cannot deactivate my calendar that came with the phone.


  • developer

    @foobar I see…



  • @rfc2822 said in "Manual sync" automatically triggered by calendar apps:

    @cal Which apps do you have installed? Which calendar apps?

    Currently I’m using Google calendar. I had used SimpleCalendar for a while, which is nice but has a bug that makes deleted events reappear until you sync. I would need to try again to see if this timed sync would happen with disabled Google calendar.
    My phone is a Moto G5 if it matters.



  • @foobar said in "Manual sync" automatically triggered by calendar apps:

    I cannot deactivate my calendar that came with the phone.

    Why not? Settings -> Apps ->Calendar -> disable, works on my phone.
    FWIW, I’m also using f-droid.



  • @cal It does not work to deactivate, it is greyed out.



  • @rfc2822: I would not tag this enhancement, as it is a function that is accesible through the configuration of davdroid but does not do what it is expected to be done.

    The user is expecting that carddav and caldav only sync when in the wireless ssid network it was restricted in the options.


  • developer

    @foobar said in "Manual sync" automatically triggered by calendar apps:

    The user is expecting that carddav and caldav only sync when in the wireless ssid network it was restricted in the options.

    So there seem to be different expectations, which is good to know.

    For instance, I expect DAVdroid to ignore WiFi settings when sync is initiated manually. This was actually a design decision: I have an account which shall only be synced in WiFi to save traffic, but sometimes I need a manual sync to get the latest data (regardless of whether the sync is iniated from DAVdroid UI or, what is more likely to happen, from the calender UI over the Refresh action).

    If this really causes problems, it might need to be changed, but until now, we haven’t heard of this problem often, so it seems to occur for very few users yet. At the moment, it seems quite specific to me that there is a calendar app installed that automatically causes “manual” syncs, and this calendar app can’t be deactivated or removed.

    @foobar What about just ignoring/disabling DAVdroid notifications in this rare case? They should have minimum priority, so don’t cause a notifcation icon/sound. Can you confirm that?

    What we could do in any case is to make description texts more specific, like “restrict automatic sync to WiFi” instead of “restrict sync to WiFi”.



  • @rfc2822 said in "Manual sync" automatically triggered by calendar apps, which will ignore WiFi restrictions:

    it seems quite specific to me that there is a calendar app installed that automatically causes “manual” syncs

    It’s not only calendar but also contacts, a few days ago I had a DAVdroid IO error notification from contacts sync even though I didn’t even open the contacts app for a few days. (Google apps, both contacts and calendar).

    Google doesn’t care about our usecase, they only care that your data ends up in the Google cloud asap. So I think it doesn’t matter what SYNC_EXTRAs the apps use or if that usages aligns with Google’s documentation. What matters is if DAVdroid meets the user’s expectations. Which it apparently does for thousands of users except two ;-/

    In my case, I must say DAVdroid betrayed my expectations by providing a “sync interval = only manually” setting. Thus I chose to set up my radicale server in the most simple way to sync via http with plain text auth. I think if DAVdroid allows to run syncs at random times controlled by random apps then it should consequently enforce to use strongly encrypted and authenticated connections.



Maybe you're interested in these topics?

  • 8
  • 1
  • 5
  • 9
  • 1