views:

27

answers:

1

Hello

I am trying to retrieve email from the contacts .I am able to retrieve it successfully ,but if there are no email set for a person and if i try to retrieve their contact then the app crashes. I want to check whether the mail is there or not for particular contact and display an alert if there is no mail set for the contact.How can i achieve it .Please help me out.Thanks.

A: 

I solved it by finding the cfindex value it returns 1 if mailid is available and 0 if no mail id is not available.

CFIndex emailCount = ABMultiValueGetCount(mail1);
Warrior