Retrieving Phone Contacts - StansAssets/com.stansassets.ultimate-mobile GitHub Wiki
The code snippet below shows you how to load all user phonebook contacts. Use the UM_Application.ContactsService as an entry point. Loaded contact entries will be represented as UM_iContact instance.
using SA.CrossPlatform.App;
...
var client = UM_Application.ContactsService;
client.Retrieve((result) => {
if(result.IsSucceeded) {
foreach(UM_iContact contact in result.Contacts) {
Debug.Log("contact.Name:" + contact.Name);
Debug.Log("contact.Phone:" + contact.Phone);
Debug.Log("contact.Email:" + contact.Email);
}
} else {
Debug.Log("Failed to load contacts: " + result.Error.FullMessage);
}
});