editContact Method

This method accesses the edit contact functionality on the device for the specified contact

intel.xdk.contacts.editContact(contactID);

Description:

This method displays the native device's contacts application to allow the user to edit a contact. Once a user is done with their update, it will fire the intel.xdk.contacts.edit event.

Platforms:

Parameters:

  • contactID: The contact ID of the contact to modify

Events:

  • intel.xdk.contacts.edit: This event is fired when the content of the contact has been updated or the operation cancelled.
  • intel.xdk.contacts.busy: This event will fire if the contacts.editContact method is called while another process is blocking access to the device's contacts.

Example:


document.addEventListener('intel.xdk.contacts.edit', onContactEdit);

intel.xdk.contacts.editContact(contactID);

function onEditContact(evt) {
   if (evt.success == true)
   {
      alert("Contact "+evt.contactid+" successfully updated");
   }
   else if (evt.cancelled == true)
   {
      alert("Edit Contact Cancelled");
   }
            
Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.