Ejemplo n.º 1
0
        public void AddContacts()
        {
            FriendsPhones friendsPhones = new FriendsPhones()
            {
                numbers = new List <string>()
            };

            ISN_CNContactStore.ShowContactsPickerUI((result) => {
                uiManagerScript.LoadingInviteFriend();
                if (result.IsSucceeded)
                {
                    foreach (var contact in result.Contacts)
                    {
                        if (contact.Phones.Count > 0)
                        {
                            string fullNumber = contact.Phones[0].FullNumber;
                            friendsPhones.numbers.Add(fullNumber);
                        }
                    }
                    StartCoroutine(SendInvites(friendsPhones));
                }
                else
                {
                    uiManagerScript.ResultFriendInvite(false, "Hmmmm... Server error, try again!");
                }
            });
        }