コード例 #1
0
        private IEnumerator CRDeleteContact(ContactView view, Contact contact)
        {
            yield return(StartCoroutine(CRRequestPermission(AndroidPermission.AndroidPermissionWriteContacts)));

            if (contact == null)
            {
                yield break;
            }

            var message = string.Format("Delete contact with id: " + (contact.Id ?? "null"));
            var alert   = NativeUI.ShowTwoButtonAlert("Delete Contact", message, "Yes", "No");

            alert.OnComplete += button =>
            {
                if (button == 1) // Click No
                {
                    return;
                }

                var deleteResult = DeviceContacts.DeleteContact(contact);
                if (deleteResult != null)
                {
                    Debug.LogWarning(deleteResult);
                    return;
                }

                createdViews.Remove(view);
                Destroy(view.gameObject);
            };
        }
コード例 #2
0
 private IEnumerator CRDeleteContact(ContactView view, Contact contact)
 {
     return(null);
 }
コード例 #3
0
 public void DeleteContact(ContactView view, Contact contact)
 {
     StartCoroutine(CRDeleteContact(view, contact));
 }
コード例 #4
0
 public void DeleteContact(ContactView view, Contact contact)
 {
 }