IEnumerator CRGetAllContacts() { yield return(StartCoroutine(CRRequestPermission(AndroidPermission.AndroidPermissionReadContacts))); DeviceContacts.GetContacts((error, contacts) => { if (!string.IsNullOrEmpty(error)) { NativeUI.Alert("Get All Contacts Error", error); } if (contacts != null) { foreach (var contact in contacts) { AddContactView(contact); } } }); }
public override void OnEnter() { DeviceContacts.GetContacts(OnContactsReceived); }