aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • Mobile
  • Programming

Announcing Glance: Tiles For Wear OS Made simple

  • aster.cloud
  • January 31, 2022
  • 2 minute read

Last year we announced the Wear Tiles API. To complement that Java API, we are excited to announce that support for Wear OS Tiles has been added to Glance, a new framework built on top of Jetpack Compose designed to make it easier to build for surfaces outside your app on Android. We’d love to get your feedback on this alpha version.

Tiles provide Wear OS users easy access to the information and actions they need in order to get things done quickly. They also are one of the most used surfaces on Wear OS. Just one swipe away from the Watch Face, users can quickly access the most important information or actions from an app, like start a timer or get the latest weather forecast.


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

 

Watch face gif

Let’s see how we can create a Tile with Glance:

 

class HelloTileService : GlanceTileService() {
   @Composable
   override fun Content() {
       Text(text = "Hello Glance")
   }
}

 

The simple code above generates the Tile below.

 

“Hello Glance” Tile sample with Glance

“Hello Glance” Tile sample with Glance

 

Note: Using Glance-wear-tiles requires`minSdkVersion`>= 26.

 

How it works

Glance creates “glanceable” experiences across Android surfaces using a base-set of Composables. For Tiles on Wear OS, Glance translates Composables into Tiles.

 

Diagram: Glance structure

Diagram: Glance structure

 

Glance requires Compose to be enabled and depends on Runtime, Graphics, and Unit UI Compose layers, but it’s not directly interoperable with other existing Jetpack Compose UI elements, like Compose for Wear OS.

What’s in the Alpha

This initial release introduces the main APIs to build wear Tiles:

  • <a href="https://developer.android.com/reference/kotlin/androidx/glance/wear/tiles/GlanceTileService" target="_blank" rel="noopener">GlanceTileService</a> – A service to create your tile in the composable Content() function.
  • Initial set of Glance Composables: <a href="https://developer.android.com/reference/kotlin/androidx/glance/layout/package-summary#box" target="_blank" rel="noopener">Box</a>, <a href="https://developer.android.com/reference/kotlin/androidx/glance/layout/package-summary#row" target="_blank" rel="noopener">Row</a>, <a href="https://developer.android.com/reference/kotlin/androidx/glance/layout/package-summary#column" target="_blank" rel="noopener">Column</a>, <a href="https://developer.android.com/reference/kotlin/androidx/glance/text/package-summary#text" target="_blank" rel="noopener">Text</a>, <a href="https://developer.android.com/reference/kotlin/androidx/glance/package-summary#image" target="_blank" rel="noopener">Image</a>, <a href="https://developer.android.com/reference/kotlin/androidx/glance/layout/package-summary#spacer" target="_blank" rel="noopener">Spacer</a>, <a href="https://developer.android.com/reference/kotlin/androidx/glance/wear/tiles/curved/package-summary#curvedrow" target="_blank" rel="noopener">CurvedRow</a>, <a href="https://developer.android.com/reference/kotlin/androidx/glance/wear/tiles/curved/CurvedRowScope#curvedtext" target="_blank" rel="noopener">CurvedText</a>.
  • <a href="https://developer.android.com/reference/kotlin/androidx/glance/GlanceModifier.html" target="_blank" rel="noopener">GlanceModifier</a> – Plays the same role as androidx.compose.ui.Modifier but for the Glance composables.
  • <a href="https://developer.android.com/reference/kotlin/androidx/glance/appwidget/action/package-summary#actionstartactivity" target="_blank" rel="noopener">actionStartActivity</a> – Starts an Activity from a user interaction.
  • <a href="https://developer.android.com/reference/kotlin/androidx/glance/wear/tiles/TimelineMode.SingleEntry">TimelineMode.SingleEntry</a> and <a href="https://developer.android.com/reference/kotlin/androidx/glance/wear/tiles/TimelineMode.TimeBoundEntries">TimelineMode.TimeBoundEntries</a> – Handle single-entry and time bound timeline entries.
  • <a href="https://developer.android.com/reference/kotlin/androidx/glance/state/GlanceStateDefinition.html" target="_blank" rel="noopener">GlanceStateDefinition</a> – Persistent tile state
  • <a href="https://developer.android.com/reference/kotlin/androidx/glance/wear/tiles/package-summary#localtimeinterval" target="_blank" rel="noopener">LocalTimeInterval</a> – Local compositions (similar to <a href="https://developer.android.com/reference/kotlin/androidx/glance/package-summary#localstate" target="_blank" rel="noopener">LocalState</a>)

We are working on bringing even more functionality with default theming, further Android Studio support, and more. Stay tuned for new releases.

Read More  Why A Computer Isn't The First Thing You Need When Teaching Kids To Code

Get started with Glance

For a quick start, take a look at the samples in the AndroidX repository. Glance works with the latest stable Android Studio, although since Glance relies on Compose Runtime, follow the steps on the Jetpack Compose docs to set it up first.

The Alpha version is your opportunity to influence the APIs, so please share your feedback and let us know your experience!

Happy Composing with Glance!

 

 

 

By Anna Bernbaum, Associate Product Manager
Source Android


For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

aster.cloud

Related Topics
  • AndroidX
  • Glance
  • Tiles API
  • Wear OS Tile
You May Also Like
View Post
  • Architecture
  • Data
  • Engineering
  • People
  • Programming
  • Software Engineering
  • Technology
  • Work & Jobs

Predictions: Top 25 Careers Likely In High Demand In The Future

  • June 6, 2023
View Post
  • Programming
  • Software Engineering
  • Technology

Build a Python App to Alert You When Asteroids Are Close to Earth

  • May 22, 2023
View Post
  • Programming

Illuminating Interactions: Visual State In Jetpack Compose

  • May 20, 2023
View Post
  • Computing
  • Data
  • Programming
  • Software
  • Software Engineering

The Top 10 Data Interchange Or Data Exchange Format Used Today

  • May 11, 2023
View Post
  • Gears
  • Mobile
  • Technology

Apple Watch Pride Edition Celebrates The LGBTQ+ Community

  • May 10, 2023
View Post
  • Architecture
  • Programming
  • Public Cloud

From Receipts To Riches: Save Money W/ Google Cloud & Supermarket Bills – Part 1

  • May 8, 2023
View Post
  • Programming
  • Public Cloud

3 New Ways To Authorize Users To Your Private Workloads On Cloud Run

  • May 4, 2023
View Post
  • Programming
  • Public Cloud

Buffer HTTP Requests With Cloud Tasks

  • May 4, 2023

Stay Connected!
LATEST
  • college-of-cardinals-2025 1
    The Definitive Who’s Who of the 2025 Papal Conclave
    • May 7, 2025
  • conclave-poster-black-smoke 2
    The World Is Revalidating Itself
    • May 6, 2025
  • oracle-ibm 3
    IBM and Oracle Expand Partnership to Advance Agentic AI and Hybrid Cloud
    • May 6, 2025
  • 4
    Conclave: How A New Pope Is Chosen
    • April 25, 2025
  • Getting things done makes her feel amazing 5
    Nurturing Minds in the Digital Revolution
    • April 25, 2025
  • 6
    AI is automating our jobs – but values need to change if we are to be liberated by it
    • April 17, 2025
  • 7
    Canonical Releases Ubuntu 25.04 Plucky Puffin
    • April 17, 2025
  • 8
    United States Army Enterprise Cloud Management Agency Expands its Oracle Defense Cloud Services
    • April 15, 2025
  • 9
    Tokyo Electron and IBM Renew Collaboration for Advanced Semiconductor Technology
    • April 2, 2025
  • 10
    IBM Accelerates Momentum in the as a Service Space with Growing Portfolio of Tools Simplifying Infrastructure Management
    • March 27, 2025
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • 1
    Tariffs, Trump, and Other Things That Start With T – They’re Not The Problem, It’s How We Use Them
    • March 25, 2025
  • 2
    IBM contributes key open-source projects to Linux Foundation to advance AI community participation
    • March 22, 2025
  • 3
    Co-op mode: New partners driving the future of gaming with AI
    • March 22, 2025
  • 4
    Mitsubishi Motors Canada Launches AI-Powered “Intelligent Companion” to Transform the 2025 Outlander Buying Experience
    • March 10, 2025
  • PiPiPi 5
    The Unexpected Pi-Fect Deals This March 14
    • March 13, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.