Target the highest available version, so 7 for 2.1
So you have to change the build path in eclipse to reflect that.

-theSmith

On Jan 20, 3:10 pm, Gregg Reno <gregg.r...@gmail.com> wrote:
> Thanks!  http://www.androlib.com/had the info I was looking for, 
> buthttp://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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to