Build. VERSION. SDK , which is a String that can be converted to the integer of the release. If you are on at least API version 4 (Android 1.6 Donut), the current suggested way of getting the API level would be to check the value of android .
Read moreHow many API levels are there in Android?
Android API Levels VersionSDK / API levelVersion codeAndroid 11Level 30RtargetSdk must be 30+ for new apps and app updates.Android 10Level 29QAndroid 9Level 28PAPI Levels | Android versions, SDK/API levels, version codes … apilevels.com
Read more