Automatic sync does not work on Huawei-Devices



  • Hi all,

    I set up baikal and want to use davdroid to sync calendar and contacts. Sync is working in general, but the configured sync does not work.

    I checked the FAQ and configuration guide, but found no information that would help.

    I am using a Huawei Ascend Mate 7 with Android 6.0.

    What I configured:

    • automatic snyc is set in davdroid
    • davdroid can send data with w-lan and mobile data
    • davdroid is allowed to be continued in the background

    What I would expect:

    1. When I add an appointment on my mobile it will by sent immediatelly to baikal dav-server
    2. after the set time on the mobile of my wife, the appointment appears there

    What happens:

    1. nothing, I refreshed the dav-calendar in evolution and no new appointment was sent to baikal (within one minute)
    2. Blocked due to problem 1

    Misc:
    When start manual sync on the mobiles, the appointments appear, so general sync is working!3_1486019781208_Screenshot_2017-02-02-08-00-00.png 2_1486019781208_Screenshot_2017-02-02-07-59-32.png 1_1486019781208_Screenshot_2017-02-02-07-58-25.png 0_1486019781208_Screenshot_2017-02-02-07-57-23.png


  • developer

    Hello,

    Please provide debug info.


  • i18n

    Maybe you can try this: https://davdroid.bitfire.at/faq/entry/miui-no-synchronization/

    Chinese brand Android phones usually have add-ons that prevent power-comsuming auto-things.



  • Hi,

    phy25, thanks for information,. Those settings are not available on my device.

    rfc822, here are the requested information:

    SOFTWARE INFORMATION
    Package: at.bitfire.davdroid
    Version: 1.3.8-gplay (134) Sun Jan 29 20:35:03 GMT+01:00 2017
    Installed from: com.android.vending
    JB Workaround installed: no
    
    CONFIGURATION
    System-wide synchronization: automatically
    Account: <myMailAdress>
     Address book sync. interval: 60 min
     Calendar     sync. interval: 60 min
     OpenTasks    sync. interval: manually
     WiFi only: false
     [CardDAV] Contact group method: GROUP_VCARDS
     [CalDAV] Time range (past days): 90
              Manage calendar colors: true
    
    SQLITE DUMP
    android_metadata
    |  locale |
    |  de_DE |
    ----------
    settings
    |  setting | value |
    |  distrustSystemCerts | 0 |
    |  hint_BatteryOptimizations | 0 |
    |  logToExternalStorage | 0 |
    ----------
    services
    |  _id | accountName | service | principal |
    |  15 | <myMailAdress> | carddav | https://<myServer>/baikal/html/dav.php/principals/michael/ |
    |  16 | <myMailAdress> | caldav | https://<myServer>/baikal/html/dav.php/principals/michael/ |
    ----------
    sqlite_sequence
    |  name | seq |
    |  services | 16 |
    |  homesets | 24 |
    |  collections | 24 |
    ----------
    homesets
    |  _id | serviceID | url |
    |  23 | 15 | https://<myServer>/baikal/html/dav.php/addressbooks/michael/ |
    |  24 | 16 | https://<myServer>/baikal/html/dav.php/calendars/michael/ |
    ----------
    collections
    |  _id | serviceID | url | readOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | sync |
    |  23 | 15 | https://<myServer>/baikal/html/dav.php/addressbooks/michael/default/ | 0 | Default Address Book | Default Address Book for Michael Dietrich-Spitzley | <null> | <null> | <null> | <null> | 1 |
    |  24 | 16 | https://<myServer>/baikal/html/dav.php/calendars/michael/default/ | 0 | Default calendar | Default calendar | <null> | <null> | 1 | 1 | 1 |
    ----------
    
    SYSTEM INFORMATION
    Android version: 6.0 (MT7-L09C432B571)
    Device: HUAWEI HUAWEI MT7-L09 (hwmt7)

  • developer

    1. nothing, I refreshed the dav-calendar in evolution and no new appointment was sent to baikal (within one minute)
    2. Blocked due to problem 1

    I don't understand that. If you add a new event in Evolution and it's not sent to Baikal, how is this related to DAVdroid?

    Can you please provide verbose steps to reproduce the problem?



  • Hi rfc2822,

    Steps to reproduce

    1. Add an event in evolution
    2. Add an event in davdroid (deviceA)
    3. Wait until sync should be done automatically (60 mins on my deviceB)
    4. Create an event on deviceB

    Expected:

    1. After 60 Minutes both events should be synced to deviceB
    2. Davdroid should send the new event to baikal

    Result

    1. No Sync
    2. no event send to baikal

    Remarks:

    • Manual sync works
    • Same behavior with contacts

    Kind regards,
    Michael


  • admin

    Google has introduced additional battery saving methods in Android 6. Did you turn off the battery saving for DAVdroid? There is a popup dialog on start-up that asks for this...



  • Hi devvv4ever,

    I accepted all requests during/after installation. Can I check it somewhere?

    Kind regards,
    Michael


  • i18n

    @der_micha2006 Hi, you can try long press DAVdroid in the recent apps interface. Check settings inside like permission, battery, etc. Huawei system has additional management options here.



  • Sorry, what do you mean with "recent apps"?

    Checked the app-settungs in Settings->Apps but found nothing that indicates to be the cause of the problem...


  • i18n

    @der_micha2006 Yes, you can access those settings by the path you mentioned too. Autostarts, background apps, permission settings might be the problem. You can also go to the system app "Phone manager" to find relevant settings (don't know whether this exists in international-version Huawei system).

    I still believe such problem is mostly caused by system settings added by the manufacturer.



  • Hi, I checked everything and found this (german) FAQ: http://www.android-hilfe.de/thema/faq-anleitungen-zum-mate-7-und-andere-huawei-smartphones.776111/#post-9853032

    Unfortunatelly it did not solve the problem. Automatic calender sync is still not working.



  • I have a similar problem on my Oneplus 3 with OxygenOS 4.0.3 (Android 7.0). My settings are to auto sync every hour (I've also changed this to 15 min for testing purposes) and immediately after local changes to my Nextcloud server. This does not work, the only way to sync is if I run it manually.

    0_1488453744847_upload-13e61410-aa35-444d-9c05-c5baa94cb9de

    I've checked the battery optimization setting and DAVDroid app is set to NO optimization.

    0_1488453944384_upload-fe97a918-c667-45b2-8382-b49485da08d9

    Also the permissions look fine:

    0_1488454801482_upload-d4b30562-4579-4429-9108-ae51aab41dd8

    0_1488454837266_upload-79671e9a-ff04-4d20-bd46-f9ab6ca4d508

    I've cheked the log but there is nothing in it until I do the manual sync:

    https://paste.fedoraproject.org/paste/fXiloLwrX4fLL9so8R80SV5M1UNdIGYhyRLivL9gydE=
    https://paste.fedoraproject.org/paste/QgBbDKyjJZO4VFfC4XHEMF5M1UNdIGYhyRLivL9gydE=

    Here is also my debug info:
    https://paste.fedoraproject.org/paste/wM-aV5xesEmZ~1rnptWUX15M1UNdIGYhyRLivL9gydE=

    EDIT: Just to add that sync is also not working the other way around: if I change something on the Nextcloud server the changes are not synced to my phone unless I do manual sync in the DAVDroid.

    Is there anything else I could check to get the sync done?


  • developer

    @avalx

    System-wide synchronization: manually

    Sync is disabled for the whole device. You'll have to enable it. Your phone's manual should contain instructions about how to do this.



  • @rfc2822 said in Automatic sync does not work on Huawei-Devices:

    @avalx

    System-wide synchronization: manually

    Sync is disabled for the whole device. You'll have to enable it. Your phone's manual should contain instructions about how to do this.

    Right, this is it - it's working now, thanks a lot!


  • developer

    @avalx Since DAVdroid 1.4.1, there's now a notification message for exactly this case. :)



  • @rfc2822 said in Automatic sync does not work on Huawei-Devices:

    @avalx Since DAVdroid 1.4.1, there's now a notification message for exactly this case. :)

    Cool, I will upgrade soon.



  • Hi,

    has anybody an idea how to solve the problem on my device? Still found no hints about this.


  • admin

    @der_micha2006 Did you try the latest version of DAVdroid? We've introduced a system-wide sync-check in DAVdroid 1.4.1, and if it is not enabled you will see a notification bar at the bottom of the screen and can enable it directly.

    It however seems very likely to be a vendor problem. Did you contact Huawei in this matter? I think we cannot help you in this case...



  • Hi, yes, I am using 1.4.1.

    No, I did not contact huawei. Do you think they will really take care about this? Usually I would expect that the programming company would do this in case of paid software like davdroid. I am not sure if it makes sense if I would be the man in the middle.

    The Problem does not appear only with my Ascend Mate 7, same problem with Huawei RIO-L01 of my wife...

    So I think it really makes sense that somebody of the development team could check this and solve the problem hopefully also for other huawei-devices...



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