Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,20 +174,19 @@ class InteractionDeepLink : TileService() {

class InteractionLoadAction : BaseTileService() {

// [START android_wear_m3_interaction_loadaction_request]
override fun onTileRequest(
requestParams: RequestBuilders.TileRequest
): ListenableFuture<Tile> {

val name: String?
val age: Int?

// When triggered by loadAction(), "name" will be "Javier", and "age" will
// be 37.
with(requestParams.currentState.stateMap) {
name = this[stringAppDataKey("name")]
age = this[intAppDataKey("age")]
val name = this[stringAppDataKey("name")]
val age = this[intAppDataKey("age")]
}

// [START_EXCLUDE]
return Futures.immediateFuture(
Tile.Builder()
.setResourcesVersion(RESOURCES_VERSION)
Expand All @@ -200,7 +199,9 @@ class InteractionLoadAction : BaseTileService() {
)
.build()
)
// [END_EXCLUDE]
}
// [END android_wear_m3_interaction_loadaction_request]

override fun MaterialScope.tileLayout(
requestParams: RequestBuilders.TileRequest
Expand Down