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  Jetpack Compose: The Alpha Release!

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

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
  • 1
    Combining AI With A Trusted Data Approach On IBM Power To Fuel Business Outcomes
    • September 21, 2023
  • 2
    Start Your Ubuntu Confidential VM With Intel® TDX On Google Cloud
    • September 20, 2023
  • Microsoft and Adobe 3
    Microsoft And Adobe Partner To Deliver Cost Savings And Business Benefits
    • September 20, 2023
  • 4
    Huawei Connect 2023: Accelerating Intelligence For Shared Success
    • September 20, 2023
  • 5
    Huawei Releases Data Center 2030, Leading Innovation and Development of New Data Centers
    • September 20, 2023
  • Penguin 6
    How To Find And Fix Broken Packages On Linux
    • September 19, 2023
  • Volkswagen 7
    Volkswagen Races Toward Next-Gen Automotive Manufacturing Leadership With Google Cloud And T-Systems
    • September 19, 2023
  • 8
    VMware Scales Multi-Cloud Security With Workforce Identity Federation
    • September 18, 2023
  • Intel Innovation 9
    Intel Innovation 2023
    • September 15, 2023
  • Private 10
    A Comeback For Private Clouds
    • September 14, 2023
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
    Microsoft And Oracle Expand Partnership To Deliver Oracle Database Services On Oracle Cloud Infrastructure In Microsoft Azure
    • September 14, 2023
  • 2
    Real-Time Ubuntu Is Now Available In AWS Marketplace
    • September 12, 2023
  • 3
    IBM Brings Watsonx To ESPN Fantasy Football With New Waiver Grades And Trade Grades
    • September 13, 2023
  • 4
    NASA Shares Unidentified Anomalous Phenomena Independent Study Report
    • September 14, 2023
  • 5
    Introducing OpenAI Dublin
    • September 14, 2023
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.