Glance

Build layouts for remote surfaces using a Jetpack Compose-style API.
Latest Update Current Stable Release Next Release Candidate Beta Release Alpha Release
December 15, 2021 - - - 1.0.0-alpha01

Declaring dependencies

To add a dependency on Glance, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

Groovy

dependencies {
    implementation "androidx.glance:glance-appwidget:1.0.0-alpha01"
}

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.1.0-beta03"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

Kotlin

dependencies {
    implementation("androidx.glance:glance:1.0.0-alpha01")
}

android {
    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.1.0-beta03"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

For more information about dependencies, see Add build dependencies.

Feedback

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.0.0

Version 1.0.0-alpha01

December 15, 2021

androidx.glance:glance:1.0.0-alpha01, androidx.glance:glance-appwidget:1.0.0-alpha01, and androidx.glance:glance-appwidget-proto:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.

Features in initial release

  • The first release of Glance includes the first set of APIs to build AppWidget using Compose Runtime with a set of new Composables optimized for “Glanceables”.

Features