Contacts Application Control – EDIT Operation
How to handle contact information (such as phone numbers, email addresses, and Web addresses) in your own application's address book using the device's Contacts application.
EDIT operation launches the Edit screen for editing the existing contact information
var person;
var addressbook = tizen.contact.getDefaultAddressBook();
function contactsFoundCB(contacts) {
person = contacts[0].personId;
var itemType = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/social/item_type", ["person"]);
var personId = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/social/item_id", [person]);
var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/social/edit", null, "vnd.tizen.item.type/vnd.tizen.contact", null, [itemType, personId]);
tizen.application.launchAppControl(appControl, null,
function() {
console.log("launch appControl succeeded");
}, function(e) {
/* Error handling */
}, null);
}
var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Anna');
try {
addressbook.find(contactsFoundCB, null, filter, null);
} catch (err) {
console.log( 'The following error occurred while finding: ' + err.name);
}