OS info
The OS information refers to the details of the operating system of the device on which the application using KInfo is currently running
version
Details about the Android OS version
Original source
The details about the Android OS version are retrieved from AndroidVersionImpl class
KInfo's source
Properties
baseOs
The base operating system version of the Android device, when empty means that is an Android stock version
sdkInt
The integer value of the current Android SDK version
codeName
The code name of the current Android version
release
The string value representing the release version of the Android operating system
incremental
The incremental version string, often used for identifying minor updates
releaseOrCodeName
Value can be either the release version or the code name of the Android version
val releaseOrCodeName: String = version.releaseOrCodeName
println(releaseOrCodeName) // e.g. 16 or Baklava
releaseOrPreviewDisplay
Value can be either the release version or preview display name (if in preview mode)
val releaseOrPreviewDisplay: String = version.releaseOrPreviewDisplay
println(releaseOrPreviewDisplay) // e.g. Android 16 Preview
securityPatch
The security patch level of the current Android version
mediaPerformanceClass
The media performance class of the Android device (used to indicate the media performance tier)
val mediaPerformanceClass: Int = version.mediaPerformanceClass
println(mediaPerformanceClass) // e.g. from 0 to 3 or more
previewSdkInt
The SDK version of the preview release (if any), if 0 is a stable release, otherwise is an experimental release and indicates which release step is the current release, such Beta 2
VERSION_CODES
Enumerated version codes for Android
Original source
The enum entries are retrieved from Build.VERSION_CODES constants
KInfo's source
Entries
CUR_DEVELOPMENT
The current development version of Android (for testing purposes)
CUPCAKE
The version code for Android 1.5
DONUT
The version code for Android 1.6
LOLLIPOP
The version code for Android Lollipop
LOLLIPOP_MR1
The version code for Android Lollipop MR1
M
The version code for Android Marshmallow
N
The version code for Android Nougat
N_MR1
The version code for Android Nougat MR1
O
The version code for Android Oreo
O_MR1
The version code for Android Oreo MR1
P
The version code for Android Pie
Q
The version code for Android 10
R
The version code for Android 11
S
The version code for Android 12
S_V2
The version code for Android 12
TIRAMISU
The version code for Android 13
UPSIDE_DOWN_CAKE
The version code for Android 14
VANILLA_ICE_CREAM
The version code for Android 15
BAKLAVA
The version code for Android 16
androidId
Unique Android ID of the device
Original source
The value of the Android ID is retrieved from Settings.Secure.ANDROID_ID property
KInfo's source
androidCodename
Android codename of the device, similar to codename property, but is more human-readable