GlanceTileService

abstract class GlanceTileService : TileService


TileService which can consume a Glance composition, convert it to a Wear Tile, and provide it to the system. You must implement the Content function to provide your Tile layout, for example:

class MyTile: GlanceTileService() {
@Composable
@GlanceComposable
override fun Content {
Text("Hello World!")
}
}

You must also register ComposeTileService instances in your manifest to allow the system to discover them. Your service must include an intent filter for the action androidx.wear.tiles.action.BIND_TILE_PROVIDER, and require the permission com.google.android.wearable.permission.BIND_TILE_PROVIDER.

Summary

Public constructors

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Public functions

abstract Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

suspend T
<T : Any?> getTileState()

This function is deprecated. glance-wear-tiles is deprecated and will be removed

open IBinder?
onBind(intent: Intent)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

open Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

open Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

open Unit
onStart(intent: Intent?, startId: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

suspend T
<T : Any?> updateTileState(updateState: suspend (T) -> T)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Protected functions

final ListenableFuture<ResourceBuilders.Resources>

This function is deprecated. glance-wear-tiles is deprecated and will be removed

open Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

final ListenableFuture<TileBuilders.Tile>

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Public properties

open GlanceStateDefinition<*>?

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open TimelineMode

This property is deprecated. glance-wear-tiles is deprecated and will be removed

Inherited functions

From android.content.Context
Boolean
bindIsolatedService(
    service: Intent,
    flags: Context.BindServiceFlags,
    instanceName: String,
    executor: Executor,
    conn: ServiceConnection
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Int

This function is deprecated. glance-wear-tiles is deprecated and will be removed

ColorStateList

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Drawable?

This function is deprecated. glance-wear-tiles is deprecated and will be removed

String
getString(resId: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

String
getString(resId: Int, vararg formatArgs: Any)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

T
<T : Any> getSystemService(serviceClass: Class<T>)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

CharSequence
getText(resId: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

TypedArray

This function is deprecated. glance-wear-tiles is deprecated and will be removed

TypedArray

This function is deprecated. glance-wear-tiles is deprecated and will be removed

TypedArray

This function is deprecated. glance-wear-tiles is deprecated and will be removed

TypedArray
obtainStyledAttributes(
    set: AttributeSet?,
    attrs: IntArray,
    defStyleAttr: Int,
    defStyleRes: Int
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendBroadcastWithMultiplePermissions(
    intent: Intent,
    receiverPermissions: Array<String>
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

From android.content.ContextWrapper
Boolean
bindIsolatedService(
    service: Intent,
    flags: Int,
    instanceName: String,
    executor: Executor,
    conn: ServiceConnection
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean
bindService(
    service: Intent,
    conn: ServiceConnection,
    flags: Context.BindServiceFlags
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean
bindService(service: Intent, conn: ServiceConnection, flags: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean
bindService(
    service: Intent,
    flags: Context.BindServiceFlags,
    executor: Executor,
    conn: ServiceConnection
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean
bindService(
    service: Intent,
    flags: Int,
    executor: Executor,
    conn: ServiceConnection
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean
bindServiceAsUser(
    service: Intent,
    conn: ServiceConnection,
    flags: Context.BindServiceFlags,
    user: UserHandle
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean
bindServiceAsUser(
    service: Intent,
    conn: ServiceConnection,
    flags: Int,
    user: UserHandle
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Int

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Int

This function is deprecated. glance-wear-tiles is deprecated and will be removed

IntArray

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Int

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Int
checkCallingUriPermission(uri: Uri, modeFlags: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

IntArray

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Int
checkContentUriPermissionFull(uri: Uri, pid: Int, uid: Int, modeFlags: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Int
checkPermission(permission: String, pid: Int, uid: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Int

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Int
checkUriPermission(uri: Uri, pid: Int, uid: Int, modeFlags: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Int
checkUriPermission(
    uri: Uri?,
    readPermission: String?,
    writePermission: String?,
    pid: Int,
    uid: Int,
    modeFlags: Int
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

IntArray
checkUriPermissions(
    uris: MutableList<Uri>,
    pid: Int,
    uid: Int,
    modeFlags: Int
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Context
createAttributionContext(attributionTag: String?)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Context
createConfigurationContext(overrideConfiguration: Configuration)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Context
createContext(contextParams: ContextParams)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Context

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Context

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Context

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Context

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Context
createPackageContext(packageName: String, flags: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Context
createWindowContext(type: Int, options: Bundle?)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Context
createWindowContext(display: Display, type: Int, options: Bundle?)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Array<String>

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
enforceCallingOrSelfPermission(permission: String, message: String?)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
enforceCallingOrSelfUriPermission(
    uri: Uri,
    modeFlags: Int,
    message: String
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
enforceCallingPermission(permission: String, message: String?)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
enforceCallingUriPermission(uri: Uri, modeFlags: Int, message: String)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
enforcePermission(permission: String, pid: Int, uid: Int, message: String?)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
enforceUriPermission(
    uri: Uri,
    pid: Int,
    uid: Int,
    modeFlags: Int,
    message: String
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
enforceUriPermission(
    uri: Uri?,
    readPermission: String?,
    writePermission: String?,
    pid: Int,
    uid: Int,
    modeFlags: Int,
    message: String?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Array<String>

This function is deprecated. glance-wear-tiles is deprecated and will be removed

File

This function is deprecated. glance-wear-tiles is deprecated and will be removed

File
getDir(name: String, mode: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

File?

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Array<File>

This function is deprecated. glance-wear-tiles is deprecated and will be removed

File

This function is deprecated. glance-wear-tiles is deprecated and will be removed

SharedPreferences

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Any

This function is deprecated. glance-wear-tiles is deprecated and will be removed

String?
getSystemServiceName(serviceClass: Class<*>)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
grantUriPermission(toPackage: String, uri: Uri, modeFlags: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean
moveDatabaseFrom(sourceContext: Context, name: String)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean
moveSharedPreferencesFrom(sourceContext: Context, name: String)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

FileInputStream

This function is deprecated. glance-wear-tiles is deprecated and will be removed

FileOutputStream
openFileOutput(name: String, mode: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

SQLiteDatabase
openOrCreateDatabase(
    name: String,
    mode: Int,
    factory: SQLiteDatabase.CursorFactory
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

SQLiteDatabase
openOrCreateDatabase(
    name: String,
    mode: Int,
    factory: SQLiteDatabase.CursorFactory,
    errorHandler: DatabaseErrorHandler?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Drawable

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Intent?

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Intent?
registerReceiver(
    receiver: BroadcastReceiver?,
    filter: IntentFilter,
    flags: Int
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Intent?
registerReceiver(
    receiver: BroadcastReceiver?,
    filter: IntentFilter,
    broadcastPermission: String?,
    scheduler: Handler?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Intent?
registerReceiver(
    receiver: BroadcastReceiver?,
    filter: IntentFilter,
    broadcastPermission: String?,
    scheduler: Handler?,
    flags: Int
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
revokeUriPermission(uri: Uri, modeFlags: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
revokeUriPermission(targetPackage: String, uri: Uri, modeFlags: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendBroadcast(intent: Intent, receiverPermission: String?)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendBroadcast(intent: Intent, receiverPermission: String?, options: Bundle?)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendBroadcastAsUser(
    intent: Intent,
    user: UserHandle,
    receiverPermission: String?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendOrderedBroadcast(intent: Intent, receiverPermission: String?)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendOrderedBroadcast(
    intent: Intent,
    receiverPermission: String?,
    options: Bundle?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendOrderedBroadcast(
    intent: Intent,
    receiverPermission: String?,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialCode: Int,
    initialData: String?,
    initialExtras: Bundle?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendOrderedBroadcast(
    intent: Intent,
    receiverPermission: String?,
    options: Bundle?,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialCode: Int,
    initialData: String?,
    initialExtras: Bundle?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendOrderedBroadcast(
    intent: Intent,
    receiverPermission: String?,
    receiverAppOp: String?,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialCode: Int,
    initialData: String?,
    initialExtras: Bundle?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendOrderedBroadcast(
    intent: Intent,
    initialCode: Int,
    receiverPermission: String?,
    receiverAppOp: String?,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialData: String?,
    initialExtras: Bundle?,
    options: Bundle?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendOrderedBroadcastAsUser(
    intent: Intent,
    user: UserHandle,
    receiverPermission: String?,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialCode: Int,
    initialData: String?,
    initialExtras: Bundle?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendStickyBroadcast(intent: Intent, options: Bundle?)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendStickyOrderedBroadcast(
    intent: Intent,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialCode: Int,
    initialData: String?,
    initialExtras: Bundle?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
sendStickyOrderedBroadcastAsUser(
    intent: Intent,
    user: UserHandle,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialCode: Int,
    initialData: String?,
    initialExtras: Bundle?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
setTheme(resid: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
startActivities(intents: Array<Intent>, options: Bundle?)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
startActivity(intent: Intent, options: Bundle?)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

ComponentName?

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean
startInstrumentation(
    className: ComponentName,
    profileFile: String?,
    arguments: Bundle?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
startIntentSender(
    intent: IntentSender,
    fillInIntent: Intent?,
    flagsMask: Int,
    flagsValues: Int,
    extraFlags: Int
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
startIntentSender(
    intent: IntentSender,
    fillInIntent: Intent?,
    flagsMask: Int,
    flagsValues: Int,
    extraFlags: Int,
    options: Bundle?
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

ComponentName?
startService(service: Intent)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
updateServiceGroup(conn: ServiceConnection, group: Int, importance: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

From android.app.Service
Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
dump(fd: FileDescriptor, writer: PrintWriter, args: Array<String>)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
onRebind(intent: Intent)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Int
onStartCommand(intent: Intent, flags: Int, startId: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
onTaskRemoved(rootIntent: Intent)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
onTimeout(startId: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
onTimeout(startId: Int, fgsType: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
onTrimMemory(level: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean
onUnbind(intent: Intent)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
startForeground(id: Int, notification: Notification)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
startForeground(
    id: Int,
    notification: Notification,
    foregroundServiceType: Int
)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
stopForeground(notificationBehavior: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
stopForeground(removeNotification: Boolean)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit
stopSelf(startId: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Boolean
stopSelfResult(startId: Int)

This function is deprecated. glance-wear-tiles is deprecated and will be removed

From androidx.wear.tiles.TileService
ListenableFuture<Void>

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Unit

This function is deprecated.

use onRecentInteractionEventsAsync.

Unit

This function is deprecated.

use onRecentInteractionEventsAsync.

ListenableFuture<ResourceBuilders.Resources>

This function is deprecated. glance-wear-tiles is deprecated and will be removed

Inherited properties

From android.content.Context
open Context.BindServiceFlags

This property is deprecated. glance-wear-tiles is deprecated and will be removed

From android.content.ContextWrapper
open Context

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open ApplicationInfo

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open AssetManager

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open AttributionSource

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open String?

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Context

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open File

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open ClassLoader

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open File

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open ContentResolver

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open File

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Int

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Display

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open File?

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Array<File>

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Array<File>

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open File

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Boolean

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Boolean

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Boolean

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Executor

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Looper

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open File

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open File

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Array<File>

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open String

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open String

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open PackageManager

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open String

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open String

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open ContextParams?

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Resources

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Resources.Theme

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Drawable

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Int

This property is deprecated. glance-wear-tiles is deprecated and will be removed

open Int

This property is deprecated. glance-wear-tiles is deprecated and will be removed

From android.app.Service
Application

This property is deprecated. glance-wear-tiles is deprecated and will be removed

Int

This property is deprecated. glance-wear-tiles is deprecated and will be removed

Public constructors

GlanceTileService

Added in 1.0.0-alpha07
Deprecated in 1.0.0-alpha07
GlanceTileService(
    errorUiLayout: LayoutElementBuilders.LayoutElement? = errorUiLayout()
)
Parameters
errorUiLayout: LayoutElementBuilders.LayoutElement? = errorUiLayout()

If not null and an error occurs within this glance wear tile, the tile is updated with an error UI using the provided layout.

Public functions

Content

Added in 1.0.0-alpha07
Deprecated in 1.0.0-alpha07
@Composable
@GlanceComposable
abstract fun Content(): Unit

Override this method to set the layout to use in your Tile.

getTileState

suspend fun <T : Any?> getTileState(): T

Retrieve the state of the wear tile provided by this service

onBind

open fun onBind(intent: Intent): IBinder?

onCreate

open fun onCreate(): Unit

onDestroy

open fun onDestroy(): Unit

onStart

Added in 1.0.0-alpha07
Deprecated in 1.0.0-alpha07
open fun onStart(intent: Intent?, startId: Int): Unit

updateTileState

suspend fun <T : Any?> updateTileState(updateState: suspend (T) -> T): T

Update the state of the wear tile provided by this service

Protected functions

onResourcesRequest

Added in 1.0.0-alpha07
Deprecated in 1.0.0-alpha07
protected final fun onResourcesRequest(requestParams: RequestBuilders.ResourcesRequest): ListenableFuture<ResourceBuilders.Resources>

Called by the system to fetch a resources bundle from this GlanceTileService.

Note that this call exists due to this class extending TileService; this should not be called directly.

onTileRemoveEvent

@CallSuper
protected open fun onTileRemoveEvent(requestParams: EventBuilders.TileRemoveEvent): Unit

Called when a tile provided by this Tile Provider is removed from the carousel.

Note that this is called from your app's main thread, which is usually also the UI thread.

Parameters
requestParams: EventBuilders.TileRemoveEvent

Parameters about the request. See TileRemoveEvent for more info.

onTileRequest

Added in 1.0.0-alpha07
Deprecated in 1.0.0-alpha07
protected final fun onTileRequest(requestParams: RequestBuilders.TileRequest): ListenableFuture<TileBuilders.Tile>

Called by the system to fetch a tile from this GlanceTileService.

Note that this call exists due to this class extending TileService; this should not be called directly.

Public properties

stateDefinition

Added in 1.0.0-alpha07
Deprecated in 1.0.0-alpha07
open val stateDefinitionGlanceStateDefinition<*>?

Data store for tile data specific to this service

timelineMode

Added in 1.0.0-alpha07
Deprecated in 1.0.0-alpha07
open val timelineModeTimelineMode

Defines the handling of timeline