Retrieving Phone Contacts - StansAssets/com.stansassets.android-native GitHub Wiki
The code snippet below shows you how to load all user phonebook contacts. Use the AN_ContactsContract as an entry point. Loaded contact entries will be represented as AN_ContactInfo class instance.
using SA.Android.Contacts;
...
AN_ContactsContract.Retrieve((result) => {
if(result.IsFailed) {
Debug.Log("Filed: " + result.Error.Message);
return;
}
Debug.Log("Loaded: " + result.Contacts.Count + " Contacts.");
foreach(var contact in result.Contacts) {
Debug.Log("contact.Id: " + contact.Id);
Debug.Log("contact.Name: " + contact.Name);
Debug.Log("contact.Note: " + contact.Note);
Debug.Log("contact.Organization: " + contact.Organization);
Debug.Log("contact.Phone: " + contact.Phone);
Debug.Log("contact.Photo: " + contact.Photo);
}
});