I was wondering how I could go about returning the name of the Android OS version (i.e. KitKat, JellyBean, etc) programatically. I'm able to find just about everything about the OS except the "codename", if you will. Any help is welcome, thanks.
I played around with an answer from the suggested question, found here, and came up with this one liner that returns the "codename" of the currently running OS version:
Build.VERSION_CODES.class.getFields()[android.os.Build.VERSION.SDK_INT].getName();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With