Ques:How do i fetch device’s SDK version and API level number?
Ans:
Build.VERSION.SDK_INT => To know API Level number i.e. 7,8,9
Build.VERSION.RELEASE => To know version code i.e. 2.1, 2.2, 2.3, 3.0
For your info,
// SDK_INT is only available in 1.6 and in newer
// REALEASE works on every version released so far.
For exaple:
TextView txtView = (TextView) findViewById(R.id.textView1); txtView.setText("SDK API Level =>" +Build.VERSION.SDK_INT); txtView.append("n Build.VERSION.RELEASE =>"+Build.VERSION.RELEASE);