Changing API level Android Studio

I want to change the minimum SDK version in Android Studio from API 12 to API 14. I have tried changing it in the manifest file, i.e., <uses-sdk android:minSdkVersion=”14″ android:targetSdkVersion=”18″ /> and rebuilding the project, but I still get the Android Studio IDE throwing up some errors. I presume I have to set the min … Read more

Retrieving Android API version programmatically

Is there any way to get the API version that the phone is currently running? 12 s 12 As described in the Android documentation, the SDK level (integer) the phone is running is available in: android.os.Build.VERSION.SDK_INT The class corresponding to this int is in the android.os.Build.VERSION_CODES class. Code example: if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP){ // Do … Read more