RequestBuilders.TileRequest
@RequiresSchemaVersion(major = 1, minor = 0)
public final class RequestBuilders.TileRequest
Parameters passed to a androidx.wear.tiles.TileBuilders.Tile Service when the renderer is requesting a new version of the tile.
Summary
Nested types |
|---|
public final class RequestBuilders.TileRequest.BuilderBuilder for |
Public methods |
|
|---|---|
@NonNull StateBuilders.State |
Gets the |
@NonNull DeviceParametersBuilders.DeviceParameters |
Gets the |
@Nullable DeviceParametersBuilders.DeviceParameters |
This method is deprecated. Use |
@NonNull Instant |
@RequiresSchemaVersion(major = 1, minor = 600)Gets the |
@NonNull ProtoLayoutScope |
getScope()Returns |
@Nullable StateBuilders.State |
This method is deprecated. Use |
int |
Gets the instance ID of the tile being requested, allocated when the tile instance is added to the carousel. |
@NonNull String |
toString() |
Public methods
getCurrentState
public @NonNull StateBuilders.State getCurrentState()
Gets the androidx.wear.protolayout.StateBuilders.State that should be used when building the tile.
getDeviceConfiguration
public @NonNull DeviceParametersBuilders.DeviceParameters getDeviceConfiguration()
Gets the androidx.wear.protolayout.DeviceParametersBuilders.DeviceParameters object describing the device requesting the tile update. If not set, a default empty instance is used.
public @Nullable DeviceParametersBuilders.DeviceParametersgetDeviceParameters()
Gets the androidx.wear.tiles.DeviceParametersBuilders.DeviceParameters object describing the device requesting the tile update.
getLastVisibleTime
@RequiresSchemaVersion(major = 1, minor = 600)
public @NonNull Instant getLastVisibleTime()
Gets the Instant representing the last time the tile was visible.
If the tile has never been visible, or the last time it was visible is not known, this will return EPOCH.
The returned value is not persistent across reboots or when the tile is removed from the carousel and added again.
getScope
public @NonNull ProtoLayoutScope getScope()
Returns ProtoLayoutScope object that is required for methods to create resources or pending intents, and it will automatically register them for a tile.
public @Nullable StateBuilders.StategetState()
Gets the androidx.wear.tiles.StateBuilders.State that should be used when building the tile.