Added in version 34.1

TileProvider

public class TileProvider
extends Object

java.lang.Object
   ↳ com.google.wear.services.tiles.TileProvider


Immutable holder for tile provider information.

Summary

Public methods

boolean equals(Object o)

ComponentName getComponentName()

Component name for the tile provider service.

int getContainerType()

Returns the container type for the tile or widget.

String getGroup()

Returns the group name that this tile or widget belongs to.

int hashCode()

String toString()

Inherited methods

Public methods

equals

Added in version 34.1
public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getComponentName

Added in version 34.1
public ComponentName getComponentName ()

Component name for the tile provider service.

Returns
ComponentName

getContainerType

Added in API level 37
public int getContainerType ()

Returns the container type for the tile or widget.

For tile, this will be fullscreen always. For widgets, this needs to be defined in XML metadata. The same widget with multiple types defined corresponds to different TileProvider objects.

Returns
int Value is one of the following:

getGroup

Added in API level 37
public String getGroup ()

Returns the group name that this tile or widget belongs to. Defaults to fully qualified service's name if not specified in XML metadata.

Group can be used for multiple tile or widget services to specify that they correspond to the same tile/widget in the carousel, and support enabling/disabling services within a group while maintaining the active status of that tile/widget even when service has changed.

See androidx.glance.wear.WearWidgetProviderInfo for more information.

Returns
String

hashCode

Added in version 34.1
public int hashCode ()

Returns
int

toString

Added in version 34.1
public String toString ()

Returns
String