Creating Tiles for Wear OS

Jun 8 2021 · Kotlin 1.5, Android 8, Android Studio 4.2

Part 1: Creating Tiles for Wear OS

03. Create a Basic Tile

Episode complete

Play next episode

About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 02. Set Up the Project Next episode: 04. Add Images to the Tile

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

Intro $[==]

Every Tile is backed by a Timeline. A Timeline contains one or more TimelineEntry instances. Each TimelineEntry is backed by a Layout and is available for a specified time interval. The system takes care of rendering different TimelineEntry instances at different time intervals

Demo $[==]

Open WaterService.kt and go to the onTileRequest method. Add a Timeline by adding the following method call to TileBuilders.Tile.builder():


private fun currentGlassText(current: String, deviceParameters: DeviceParametersReaders.DeviceParameters) = 
val deviceParams = requestParams.deviceParameters

val glassCount = waterRepository.getGlassCount()
  currentGlassText(glassCount.toString(), deviceParams)