I am writing an application that requires the user to select a contact from the contact list in order to send SMS to this contact. Can I request a contact list only for these contacts with a phone number (i.e. Not email addresses)? Currently, my code is as follows, but this shows all the contacts. Then I have to follow the logic in my activity in order to inform the user whether they have chosen a contact without an associated number and invited them to choose another.
Intent i = new Intent(Intent.ACTION_PICK, People.CONTENT_URI);
Secondly, I understand that the contact API has changed from version 2.0 and therefore is it best to select contacts for all versions of Android OS? Am I right in assuming that the new contact API does not apply to pre 2.0?
source
share