Getting device os version in Android programmatically

前端 未结 5 1749
长发绾君心
长发绾君心 2020-12-01 13:35

How can I get the current android device version (1.5, 1.6, 2.0, etc.) programmatically? i.e I have installed my apk on an Android 2.2 device. I need to get the device versi

5条回答
  •  醉酒成梦
    2020-12-01 14:15

    Take a look at the Build.VERSION version class. Depending on what you want to do, you might want to use the RELEASE or SDK_INT attribute.

提交回复
热议问题