Class DeviceContacts
Entry class for contact APIs.
Inheritance
System.Object
DeviceContacts
Namespace: EasyMobile
Assembly: cs.temp.dll.dll
Syntax
public static class DeviceContacts
Properties
IsFetchingContacts
Check if the previous GetContacts(Action<String, Contact[]>) method is still running.
Declaration
public static bool IsFetchingContacts { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
AddContact(Contact)
Add new contact into the device.
Declaration
public static string AddContact(Contact contact)
Parameters
Type | Name | Description |
---|---|---|
Contact | contact | Contact's info. Note that the "id" field will be ignored. |
Returns
Type | Description |
---|---|
System.String | Error, null if the contact has been added successfully. |
DeleteContact(Contact)
Delete a contact from the device.
Declaration
public static string DeleteContact(Contact contact)
Parameters
Type | Name | Description |
---|---|---|
Contact | contact | Contact's info. |
Returns
Type | Description |
---|---|
System.String | Error, null if the contact has been deleted successfully. |
DeleteContact(String)
Delete a contact from the device.
Declaration
public static string DeleteContact(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Contact's id. |
Returns
Type | Description |
---|---|
System.String | Error, null if the contact has been deleted successfully. |
GetContacts(Action<String, Contact[]>)
Get all the contacts in the devices.
Declaration
public static void GetContacts(Action<string, Contact[]> callback)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.String, Contact[]> | callback | Param 1: Error, null means success. Param 2: All contacts on the device, null if there's an error. |
PickContact(Action<String, Contact>)
Open native UI to pick up contacts.
Declaration
public static void PickContact(Action<string, Contact> callback)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.String, Contact> | callback | Param 1: Error, null if success. Param 2: All selected contacts. |