Skip to content

Overview

Available information

On Android target are available the below information:

Category Property Description Source
App Info appName The name of the application PackageInfo.applicationInfo
packageName The package name of the application Context.packageName
versionName The version name of the application PackageInfo.versionName
versionCode The version code of the application PackageInfoCompat
isDebug Indicates whether the application is the debug build BuildConfig.DEBUG
OS Info version Details about the Android OS version AndroidVersionImpl
VERSION_CODES Enumerated version codes for Android AndroidVersionCodeImpl
androidId Unique Android ID of the device Settings.Secure.ANDROID_ID
androidCodename Android codename of the device Custom Logic
Device Info board The board name of the device hardware Build.BOARD
bootloader The version of the device bootloader Build.BOOTLOADER
device The device name Build.DEVICE
display The display identifier for the build Build.DISPLAY
fingerprint Unique identifier for the build fingerprint Build.FINGERPRINT
hardware The name of the device hardware Build.HARDWARE
host The host name used to build the system Build.HOST
id The build ID for the software Build.ID
manufacturer The manufacturer name of the device Build.MANUFACTURER
model The model name of the device Build.MODEL
brand The brand name of the device Build.BRAND
product The product name of the device Build.PRODUCT
deviceOrientation Current orientation of the device AndroidDeviceOrientation
Supported ABIs supportedAbis List of supported ABIs for the device Build.SUPPORTED_ABIS
supported32BitAbis List of supported 32-bit ABIs for the device Build.SUPPORTED_32_BIT_ABIS
supported64BitAbis List of supported 64-bit ABIs for the device Build.SUPPORTED_64_BIT_ABIS
Tags tags Comma-separated tags associated with the build Build.TAGS
isPhysicalDevice Indicates if the device is physical or an emulator Custom Logic
System Features systemFeatureList List of system features available on the device PackageManager.systemFeatures
Display Info displayMetrics Display metrics containing screen properties AndroidDisplayMetricsImpl
Locale Info locale Locale information (language and region) LocaleManagerCompat

API source

The information are retrievable using the AndroidInfo API:

Composable context

Retrieve a KInfoState instance inside composable context

val kInfoState = rememberKInfoState()

Non-composable context

Retrieve a KInfoState instance inside non-composable context

val kInfoState = KInfoState()

AndroidInfo

Retrieve a AndroidInfo instance from kInfoState instance

val androidInfo = kInfoState.androidInfo 

Warning

You can directly retrieve androidInfo just inside the androidMain module, in the commonMain module you have to use the common usage instead, or the application will crash