How to sync phone contacts to Google Contacts?

I’ve been adding contacts for a while with the idea that they would be getting synced to my Google Contacts. I have added my Google account and enabled two-way sync. However I now find that contacts are not syncing properly

I’ve tried to log in again my Google account, toggle various options, use the ‘sync’ option from the pulley menu (doesn’t seem to do anything), but nothing helps

Looking at different contacts it looks like there is a field ‘Saved to’. For old contacts it is set to my Google account, but for new contacts it is set to ‘Phone’

I’m thinking now maybe I need to somehow manually mark contacts for syncing maybe? But I can’t find how to change this ‘Save to’ field. It does sound silly to me to have to manually sync every contact.


Ok I started posting this before I found the documentation, but see now in the documentation ‘This selection cannot be changed later’. That’s ridiculous. How do you expect me to go through each and every contact to see if I mistakenly added them with ‘Save to’ set to phone and then re-enter all the details again??!

This is broken by design! Please fix!


So my question turns into “How can I fix all my contacts with ‘Save to’ set to ‘Phone’ by accident into properly synced contacts?”

ps.

I started writing this topic in this section before I was able to find the documentation. Since text selection doesn’t work even on your own forum, and I am not re-typing all this, I am posting it here any way. Please feel free to move the topic.

Edit: Added deleting of contacts. Edit 2: Remove/re-add Google account for safety Edit 3: Dummy contact

If I understand this right, you have contacts saved locally by mistake, and you now want them synced with Google. There is no direct way to achieve this that I know of, but the following should work (details below the outlined procedure):

  1. Export your local contacts to a file
  2. Remove Google account from phone
  3. Delete all contacts
  4. Import the file to your Google account
  5. Add Google account back to phone
  6. Sync, and all contacts should appear i the People app

Extra steps to make the synced address book default for new contacts:

  1. Create a dummy contact in synced address book
  2. Once saved, you can just delete the dummy
  3. Future additions will now go in the synced address book by default

Importing directly on your phone will not work, if I remember correctly, as that always puts your contacts in local storage. (This is different from importing events to the Calendar via the UI, where you get to pick the target calendar.)

To export your contacts you will need to work from the Terminal, as described here:

and here

Before deleting contacts, you probably have to remove your Google account to avoid deletions being synced. Then delete contacts as follows:

  1. Open People app
  2. Pick Select contacts from pulley menu
  3. Pick Select all from pulley menu
  4. Tap Garbage bin icon
  5. Wait for remorse timer to run out, or swipe it left or right to delete immediately

Regarding

I agree that this is very unfortunate, and also holds for the calendar. You can’t move events between calendars either.

To somewhat easy the pain, the address book you used last time will be default for contacts added later on. So create a single new dummy contact, making sure it goes to a syncronised address book, and you won’t have to remember changing this going forward. (Same applies to Calendar.)

1 Like

Thanks for coming up with a way to fix it, although it looks quite complicated and risky. I will try to export the contacts and then see if I can import them into Google Contacts directly, maybe that will be sufficient to sync them. I am hoping the sync from Google Contacts after importing them there will override what is in the local phone.

Unfortunately it seems something goes wrong at the first step as no contacts are exported at all:

[root@Phone contacts]# contacts-tool collections
  ID: qtcontacts:org.nemomobile.contacts.sqlite::636f6c2d31  Name: aggregate
  ID: qtcontacts:org.nemomobile.contacts.sqlite::636f6c2d32  Name: local
[root@Phone contacts]# vcardconverter --export contacts.local.vcf qtcontacts:org.nemomobile.contacts.sqlite::636f6c2d32
[W] unknown:0 - The 'mergePresenceChanges' option has not been configured - presence changes will only be reported via ContactManagerEngine::contactsPresenceChanged()
[D] unknown:0 - Exporting 0 contacts
[D] unknown:0 - Wrote 0 contacts
[root@Phone contacts]# vcardconverter --export contacts.aggregate.vcf qtcontacts:org.nemomobile.contacts.sqlite::636f6c2d31
[W] unknown:0 - The 'mergePresenceChanges' option has not been configured - presence changes will only be reported via ContactManagerEngine::contactsPresenceChanged()
[D] unknown:0 - Exporting non-local contacts - your usage of this data must comply with the terms of service of the account provider or application from which the data was synced!
[D] unknown:0 - Exporting 0 contacts
[D] unknown:0 - Wrote 0 contacts

Is there an error in the command?


Ok I seems the exact form of the command is important, you can’t login using devel-su and then run the command, it needs to be exactly as shown in documentation run with the -p option:

[defaultuser@Phone ~]$ devel-su -p vcardconverter --export contacts.local.vcf qtcontacts:org.nemomobile.contacts.sqlite::636f6c2d32
Password: 
Enjoy your privileges.
[W] unknown:0 - The 'mergePresenceChanges' option has not been configured - presence changes will only be reported via ContactManagerEngine::contactsPresenceChanged()
[D] unknown:0 - Exporting 7 contacts
[D] unknown:0 - Wrote 7 contacts

Excellently programmed, I especially like the fake warning to throw you off the track.

Ok I think it worked well enough. After importing into Google Contacts and syncing back to phone, all these contacts appear to now have two address books, but they seem to be linked to the same contact. It just means when editing you need to do an extra step to select the Google Contacts option for these contacts to edit the right information, but that is probably good enough.

Thanks again @jojomen !

1 Like

You’re welcome! Good to hear that you came out relatively unscathed on the other side.

As you noted, the synced address book doesn’t “take priority” over the local one. But you should be able to delete the local contacts one by one, to avoid future confusion. Since you only had seven of them, it shouldn’t take too much effort.

I think the devel-su -p runs the command as a member of the privileged group, which is needed for access to any of the privileged apps like People and Calendar.

I filed a couple of Feature requests, since I think this procedure provides a sub-par impression. Especially since this is something likely to hit people when they first set up a new phone. Let’s see how that goes.

1 Like

And remember to create one fake contact in the synced address book, so that any new contacts go there by default. You can remove the dummy immediately, it only serves to make the People app remember your choice of address book.