Tuesday, November 3, 2009

Re: [android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!

I just published some sample code illustrating this use of both legacy and new Contacts APIs in the same app.  See http://code.google.com/p/android-business-card

Cheers,
- Dmitri

On Mon, Nov 2, 2009 at 9:31 AM, Mark Murphy <mmurphy@commonsware.com> wrote:
jarkman wrote:
> int sdkVersion = Integer.parseInt(Build.VERSION.SDK);

Note that if you are using API version 4 (1.6 and newer), there is
Build.VERSION.SDK_INT, which already converts this to an integer.

If you are still using API version 3, you'll need to parse the String as
shown above.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android 1.6 Programming Books: http://commonsware.com/books

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment