Retriving Android API version by code

I will show you how get Android API version by code.


You can use this comparation.



 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { // Example compare with Android Oreo

 }



References.

https://stackoverflow.com/questions/3423754/retrieving-android-api-version-programmatically
https://developer.android.com/training/notify-user/channels#java

https://developer.android.com/reference/android/os/Build.VERSION

Comments

Popular posts from this blog

Add image from URL