/// <summary> /// Delete a contact from the device. /// </summary> /// <param name="id">Contact's id.</param> /// <returns>Error, null if the contact has been deleted successfully.</returns> public static string DeleteContact(string id) { if (id == null) { return(InvalidContactIdMessage); } return(NativeProvider.DeleteContact(id)); }
/// <summary> /// Add new contact into the device. /// </summary> /// <param name="contact">Contact's info. Note that the "id" field will be ignored.</param> /// <returns>Error, null if the contact has been added successfully.</returns> public static string AddContact(Contact contact) { if (contact == null) { return(InvalidContactMessage); } return(NativeProvider.AddContact(contact)); }
/// <summary> /// Get all the contacts in the devices. /// </summary> /// <param name="callback"> /// Param 1: Error, null means success. /// Param 2: All contacts on the device, null if there's an error. /// </param> public static void GetContacts(Action <string, Contact[]> callback) { if (callback == null) { return; } if (NativeProvider == null) { callback(NullContactsProviderMessage, null); return; } NativeProvider.GetContacts(callback); }
/// <summary> /// Open native UI to pick up contacts. /// </summary> /// <param name="callback"> /// Param 1: Error, null if success. /// Param 2: All selected contacts. ///</param> public static void PickContact(Action <string, Contact> callback) { NativeProvider.PickContact(callback); }