Way to the cloud : Sync directly all your Android contacts to OwnCloud without using bluetooth, memory card, or Google servers
Par Mathieu le jeudi 5 décembre 2013, 11:52 - Hacks - Lien permanent
It’s the first time I have an Android phone. I thougth that years of Android development was going to offer me anything I want. I thought that all the people concerned by their privacy on their phone have already provided workarounds to flee Google servers. I was wrong.
Some days ago, I wanted to sync all my contacts to my OwnCloud server.
After a few researches, I found that I could use the CardDAV facilities from OwnCloud to sync my contacts to my phone, via an application. Great ! But how can I send my existing contacts to OwnCloud ?
Android separates the intern contacts and the “synced” contacts and I couldn’t find the command to say “hey, copy all the existing contacts for syncing”. I couldn’t use bluetooth to send my contacts because my computer does not have a bluetooth adaptator. I don’t have a memory card to transfer all my contacts. I can’t figure out how to dump the contacts from the phone via USB. I don’t want to sync to Google to be able to download all my contacts and send them back to OwnCloud.
Argh, why is it so complicated to sync my existing contacts to OwnCloud ?
Here is how I did it.
Prerequisites
- Have an OwnCloud server running.
- Have the CardDAV-Sync application (either the free or paid version if you want to support the author).
Steps
On your phone, open “Contacts”, then open the settings menu, and select “Import/Export”.
Select “Export to USB storage”
Select all your contacts, and validate
The phone now has a file named “something.vcf”. I didn’t succeed in downloading that file from my phone (argh) with the USB cable. So…
Delete all your existing contacts on your phone (be strong). If you don’t want to be that strong, you can skip this step.
- Backup your OwnCloud server database. Preventing is better than fixing.
Set up CardDAV-Sync with your OwnCloud informations (URL, login, password). The URL should be something like that :
https://your-owncloud-server/path-to-owncloud/remote.php/carddav/principals/yourlogin
- Don’t forget to check the option to sync from your phone to the OwnCloud server, otherwise your imported contacts will stay on the phone and will never be synced.
Then, open the VCF file on your phone. It will ask you what to do. Just say “Import to [your CardDAV contacts]”.
W00t! All my existing contacts are now imported to the OwnCloud contacts on my phone. And now it starts syncing to my server! This is brillant!
Conclusion
This is a workaround, more a “hack” than a real solution. I can’t figure out why I haven’t been able to download with USB the VCF file from my phone, or copying my internal contacts to the OwnCloud contacts on my phone. Maybe it’s fixed in recent Android versions.
See also : http://doc.owncloud.org/server/4.5/user_manual/contacts.html