Can I write to my Phone's Contacts Using the Contact Service

This forum contains topics that were moved from Get Satisfaction
Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Can I write to my Phone's Contacts Using the Contact Service

Post by Deon »

Hi

I am able to list contacts. I would alos like to be able to write contacts. Is that possible?

Thanks

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Can I write to my Phone's Contacts Using the Contact Service

Post by Evgene Karachevtsev »

Hello Deon,

Sorry, I'm not sure I understand you correctly, could you please clarify - you want to create a new contact in a phone contacts using your app?

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Can I write to my Phone's Contacts Using the Contact Service

Post by Deon »

Hi Evgene

Correct. It seems that the Contacts Service only allows you to retrieve contacts and and there is no facility to write to contacts.

I have created an app to collect contact info and I need this to be written to the Device's Contacts.

Thank you

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Can I write to my Phone's Contacts Using the Contact Service

Post by Yurii Orishchuk »

Hi Deon,

Yes contacts service only gets contacts from device..

Here is a JS code to add needed contact to device:

pre

//Here contact details object.
var testContact = {"displayName": "Test User1"};

var myContact = navigator.contacts.create(testContact);
myContact.save();

/pre

You can fill "testContact" object with all field you need.

Regards.

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Can I write to my Phone's Contacts Using the Contact Service

Post by Deon »

Awesome, thank you Yurri!

Post Reply