File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
wear/src/main/java/com/example/wear/snippets/m3/tile Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -174,20 +174,19 @@ class InteractionDeepLink : TileService() {
174
174
175
175
class InteractionLoadAction : BaseTileService () {
176
176
177
+ // [START android_wear_m3_interaction_loadaction_request]
177
178
override fun onTileRequest (
178
179
requestParams : RequestBuilders .TileRequest
179
180
): ListenableFuture <Tile > {
180
181
181
- val name: String?
182
- val age: Int?
183
-
184
182
// When triggered by loadAction(), "name" will be "Javier", and "age" will
185
183
// be 37.
186
184
with (requestParams.currentState.stateMap) {
187
- name = this [stringAppDataKey(" name" )]
188
- age = this [intAppDataKey(" age" )]
185
+ val name = this [stringAppDataKey(" name" )]
186
+ val age = this [intAppDataKey(" age" )]
189
187
}
190
188
189
+ // [START_EXCLUDE]
191
190
return Futures .immediateFuture(
192
191
Tile .Builder ()
193
192
.setResourcesVersion(RESOURCES_VERSION )
@@ -200,7 +199,9 @@ class InteractionLoadAction : BaseTileService() {
200
199
)
201
200
.build()
202
201
)
202
+ // [END_EXCLUDE]
203
203
}
204
+ // [START android_wear_m3_interaction_loadaction_request]
204
205
205
206
override fun MaterialScope.tileLayout (
206
207
requestParams : RequestBuilders .TileRequest
You can’t perform that action at this time.
0 commit comments