removeContact Method

This method removes a specific contact and the contact's information from the device.

intel.xdk.contacts.removeContact(contactID);

Description:

This method displays the native device's contacts application to allow the user to remove a contact. Once a contact is removed, it will fire the intel.xdk.contacts.remove event.

Platforms:

Parameters:

  • contactID: The contact ID of the contact to remove from the list

Events:

  • intel.xdk.contacts.remove: This event is fired when contact information has been removed from the list.
  • intel.xdk.contacts.busy: This event will be fire if the contacts.removeContact method is called while another process is blocking access to the device's contacts.

Example:


document.addEventListener('intel.xdk.contacts.remove', onContactRemoved);

intel.xdk.contacts.removeContact(contactID);

function onEditContact(evt) {
   if (evt.success == true)
   {
      alert("Contact "+evt.contactid+" has been removed");
   }
            
Per informazioni più dettagliate sulle ottimizzazioni basate su compilatore, vedere il nostro Avviso sull'ottimizzazione.