1

I have an app which needs to do something differently on new Android 4.3 devices. I was looking at using:

http://developer.android.com/training/basics/supporting-devices/platforms.html#version-codes

To check the version is 4.3 however there does not seem to be a Build.VERSION_CODES for 4.3?

So how could I go about finding out if the device is running Android 4.3

DevWithZachary
  • 3,545
  • 11
  • 49
  • 101
  • this has been answered before: http://stackoverflow.com/questions/3093365/how-can-i-check-the-system-version-of-android – sksallaj Oct 03 '13 at 17:21

2 Answers2

3

To check the version is 4.3 however there does not seem to be a Build.VERSION_CODES for 4.3

Sure there is. Android 4.3 is JELLY_BEAN_MR2. Your build target (e.g., Project > Properties > Android in Eclipse) will need to be set to API Level 18.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
2

This should get the job done.

android.os.Build.VERSION.RELEASE

That will give you the actual numbers of your version; aka 2.3.3 or 2.2.

Umer Farooq
  • 7,356
  • 7
  • 42
  • 67