-2

I have an android app Iv'e built and in this app I would like to check what is the android version of the device running the app and act accordingly. Is there any way to check it?

Erez Priel
  • 65
  • 1
  • 10

2 Answers2

0
 android.os.Build.VERSION

This provides the current version

dileep
  • 347
  • 4
  • 16
-1

if (android.os.Build.VERSION.SDK_INT == android.os.Build.VERSION_CODES.GINGERBREAD) { // only for gingerbread and newer versions }

d.k.
  • 415
  • 4
  • 16