Skip to content
🤔 Documentation issue? Report or edit

How to get Android Context


This is the API of version 1.0.5. Newer versions may have a different one

You can use LocalContext.current to receive the context of your Android App inside a Compose Function

fun AndroidContextComposeDemo() {
    val context = LocalContext.current
    Text(text = "Read this string from Context: "+context.getString(R.string.app_name))

See also:

Last update: November 16, 2021
Back to top