How to remove contacts from device when address book is unselected?



  • Hello,

    we have 5 departments, every department has it´s own address book on our nextcloud server, sharing it read-only with all the users. In DAVdroid 1.9-ose on devices with Android 7 (Samsung S5 neo or A5) every user can select the address books he wants to see on his device.
    Many users do not select all available address books, so they do not have so many contacts on their device.

    Sometimes they need a contact from another department, so they just select this additional address book in DAVdroid, wait some moments, and they appear on the device. Works fine!

    But this contacts stay at the device, even when they unselect the additional address book. Manuall sync or waiting a day does not help.

    How can they remove the local contacts (without affecting the contacts on the server)?

    Thanks for any ideas!

    Joerg


  • admin

    Hello Joerg,

    unselecting the address book and forcing a sync should remove the respective "DAVdroid address book" account from the device, which should remove the contacts as well.

    Best regards,
    Bernhard



  • Hello Bernhard,

    as I wrote in my post: "even when they unselect the additional address book. Manuall sync or waiting a day does not help."

    I expected it to work the way you described, but it doesn`t.

    Joerg


  • developer

    Unselecting the address book, followed by a forced sync, should remove the corresponding "DAVdroid Address Book" account, which should then remove the contacts. Can you check whether the "DAVdroid Address Book" account is still there (in Android settings / Accounts)?


  • developer

    Works as expected here… can you provide the verbose logs when you synchronize after unselecting the address book?



  • Hello,

    I will try again on monday back in the office and will look for the logs to send them to you.

    Joerg



  • Hello,

    the contacts still stay on the phone.
    The logs contain information about our company I must not post here.

    I looked in settings/accounts at davdroid-adressbook, there are still accounts for all the different addressbooks. @rfc288 said, they should disappear, so I tried to remove them manually. But I can´t do this because it´s blocked by our mobile device management MDM.

    This seems to be the real trouble source. When I allow "add/remove accounts" in the MDM, DAVdroid works as described and expected. Problem not solved, but reason identified. No I have to find out how to keep it blocked for the average user but allow for DAVdroid.

    Thanks for your help, @devvv4ever and @rfc2822

    I didn´t find where to add a "solved"-tag to this thread, perhaps anyone else could do this? Thanks!

    Joerg


  • developer

    @eniki said in How to remove contacts from device when address book is unselected?:

    I looked in settings/accounts at davdroid-adressbook, there are still accounts for all the different addressbooks. @rfc288 said, they should disappear, so I tried to remove them manually. But I can´t do this because it´s blocked by our mobile device management MDM.

    This seems to be the real trouble source. When I allow "add/remove accounts" in the MDM, DAVdroid works as described and expected. Problem not solved, but reason identified. No I have to find out how to keep it blocked for the average user but allow for DAVdroid.

    Didn't know that this can be blocked although DAVdroid should have the permission according to Android's permission system. Which MDM do you use?

    We're providing a DAVdroid version for MDM/EMM and are interested in solving compatbility issues like this.



  • @rfc2822
    We are using Airwatch MDM, with Android for work and full managed devices.

    More Details would require a private message, to not publish internal company informations.

    I found the DAVdroid for MDM in the play store, will have a look at it.

    Joerg


 

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