i'developing an application that has feature to select a contact from Contacts list.
Problem is, when i run application in "DEBUG" mode and debug my ContactPicker code, the picker runs quite thouroughly.
but when i run application in the device without debugging by simply delpoying it and choose option to "Select from Contact List" the app suddenly crashes and "Start screen" appears directly.
Anyone know what is this problem?
Here's snippet of my code::
private async Task SelectContacts()
{
try
{
ContactPicker contactPicker = new ContactPicker();
contactPicker.desiredFieldsWithContactFieldType.append(ContactFieldType.PhoneNumber);
Contact contact = await contactPicker.PickContactAsync();
if (contact != null)
{
Account acc = new Account();
...
...
...
//my next implementation
}
}
catch (Exception)
{
throw;
}
}