Thanks!  http://www.androlib.com/ had the info I was looking for, but
http://www.androidzoom.com/ looks out of date.

The problem I have with using one version is that if I target the app
as 1.6, I can't build the project because I need the following import
to launch an activity to select a contact with 2.0:

    import android.provider.ContactsContract;

Is there a safe way I could target 1.6 but import
android.provider.ContactsContract from the 2.0 library and still be
ok?

I could use this code:

int sdkVersion = Integer.parseInt(Build.VERSION.SDK);
if (sdkVersion < 5) {
    intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI);
} else {
    intent = new Intent(Intent.ACTION_PICK,
ContactsContract.Contacts.CONTENT_URI);
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to