Skip to content

hiroaki404/tileSamples

Repository files navigation

TileSamples

This repository provides sample code demonstrating how to update tiles and create tile UIs.

TileService

Note: Tiles will not update after building and running the app. You need to remove and re-add the tile to see the updates.

NormalSuspendingTileService

Simply displays "Hello World!".

NormalSuspendingTileService

DynamicExpressionTileService

This is a Count Up tile. It actually displays the seconds part of the current time. Uses Dynamic Expression.

DynamicExpressionTileService

PeriodicUpdateTileService

A new column is added every 60 seconds. Creates multiple TimelineEntry objects.

PeriodicUpdateTileService

RefreshTileService

Displays the current time but updates only every 60 seconds. Uses setFreshnessIntervalMillis().

RefreshTileService

RequestUpdateTileService

Displays the current time but updates only every 60 seconds. Intended for external updates. Important: In a production environment, do not use GlobalScope. Use WorkManager or other appropriate tools instead. Updates continue for 10 minutes after adding the tile.

RefreshTileService

UseRendererWithImageResourceTileService

The image is fetched remotely. The Renderer class is used for this purpose.

UseRendererWithImageResourceTileService

MyGlanceTileSerVice

As of July 2024, dynamic expressions are not supported in Android Glance. Additionally, TimelineEntry is currently limited to a single entry. It seems better to stick to simple tiles or experimental use for now. If you have any good tips on how to make the most of Glance, please let me know.

glance_tile

LayoutTileService and click action

catalog of layouts. It's generally recommended to refer to the official WearTilesKotlin samples. The layout switches when click on it.

wear-os-samples/WearTilesKotlin at main · android/wear-os-samples wear-os-samples/WearTilesKotlin/app/src/debug/java/com/example/wear/tiles/golden at main · android/wear-os-samples

layout

official samples

About

wear tile samples (Android)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages