TilesManager
public
class
TilesManager
extends Object
| java.lang.Object | |
| ↳ | com.google.wear.services.tiles.TilesManager |
Provides access to tiles management APIs.
An instance of this class can be obtained directly via the Wear SDK by invoking com.google.wear.Sdk.getWearManager(Context,Class) API.
Summary
Constants | |
|---|---|
int |
WIDGET_CONTAINER_TYPE_FULLSCREEN
Represents a fullscreen widget container, equivalent to a Wear Tile. |
int |
WIDGET_CONTAINER_TYPE_LARGE
Represents a large widget container. |
int |
WIDGET_CONTAINER_TYPE_SMALL
Represents a small widget container. |
Public methods | |
|---|---|
void
|
getActiveTiles(Executor callbackExecutor, OutcomeReceiver<List<TileInstance>, Exception> callback)
Asynchronously provides a single snapshot of the list of all active tiles belonging to the caller's package name. |
Inherited methods | |
|---|---|
Constants
WIDGET_CONTAINER_TYPE_FULLSCREEN
public static final int WIDGET_CONTAINER_TYPE_FULLSCREEN
Represents a fullscreen widget container, equivalent to a Wear Tile.
Constant Value: 0 (0x00000000)
WIDGET_CONTAINER_TYPE_LARGE
public static final int WIDGET_CONTAINER_TYPE_LARGE
Represents a large widget container. Support for this container type is device dependent.
Constant Value: 1 (0x00000001)
WIDGET_CONTAINER_TYPE_SMALL
public static final int WIDGET_CONTAINER_TYPE_SMALL
Represents a small widget container. Support for this container type is device dependent.
Constant Value: 2 (0x00000002)
Public methods
getActiveTiles
public void getActiveTiles (Executor callbackExecutor,
OutcomeReceiver<List<TileInstance>, Exception> callback)Asynchronously provides a single snapshot of the list of all active tiles belonging to the caller's package name.
| Parameters | |
|---|---|
callbackExecutor |
Executor: The executor that the callback runs on. The callback event will be
dispatched through this Executor, providing an easy way to control which thread is used.
To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). |
callback |
OutcomeReceiver: The callback to run when the operation is completed. The possible errors
thrown are IllegalArgumentException if the passed context to com.google.wear.Sdk.getWearManager(Context,Class) is non-existent or doesn't match the
caller's UID, or Exception in case of an internal error. |