Android examples for Android OS:OS Build
The user-visible SDK version of the framework; its possible values are defined in Build.VERSION_CODES .
//package com.java2s; public class Main { /**/* w w w . j a v a 2 s . co m*/ * The user-visible SDK version of the framework; its possible * values are defined in {@link Build.VERSION_CODES}. * @return */ public static final int obtainSystemSDKInt() { return android.os.Build.VERSION.SDK_INT; } }