WatchFaceRuntimeService


abstract class WatchFaceRuntimeService : WatchFaceService

Known direct subclasses
ListenableWatchFaceRuntimeService

This class is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.


WatchFaceRuntimeService is a special kind of WatchFaceService, which loads the watch face definition from another resource only watch face package (see the resourceOnlyWatchFacePackageName parameter passed to createUserStyleSchema, createComplicationSlotsManager, createUserStyleFlavors and createWatchFace).

WatchFaceRuntimeServices are required to be stateless as multiple can be created in parallel. If per instance state is required please use StatefulWatchFaceRuntimeService.

Note because a WatchFaceRuntimeService loads it's resources from another package, it will need the following permission:

    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="QueryAllPackagesPermission" />

Currently Wear OS only supports the runtime for the Android Watch Face Format (see https://developer.android.com/training/wearables/wff for more details).

Note only one watch face definition per resource only watch face package is supported.

use Watch Face Format instead

Summary

Public constructors

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Protected functions

final ComplicationSlotsManager
createComplicationSlotsManager(
    currentUserStyleRepository: CurrentUserStyleRepository
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

abstract ComplicationSlotsManager
@WorkerThread
createComplicationSlotsManager(
    currentUserStyleRepository: CurrentUserStyleRepository,
    resourceOnlyWatchFacePackageName: String
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final UserStyleFlavors
createUserStyleFlavors(
    currentUserStyleRepository: CurrentUserStyleRepository,
    complicationSlotsManager: ComplicationSlotsManager
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

abstract UserStyleFlavors
@WorkerThread
createUserStyleFlavors(
    currentUserStyleRepository: CurrentUserStyleRepository,
    complicationSlotsManager: ComplicationSlotsManager,
    resourceOnlyWatchFacePackageName: String
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final UserStyleSchema

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

abstract UserStyleSchema
@WorkerThread
createUserStyleSchema(resourceOnlyWatchFacePackageName: String)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final suspend WatchFace
createWatchFace(
    surfaceHolder: SurfaceHolder,
    watchState: WatchState,
    complicationSlotsManager: ComplicationSlotsManager,
    currentUserStyleRepository: CurrentUserStyleRepository
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

abstract suspend WatchFace
@WorkerThread
createWatchFace(
    surfaceHolder: SurfaceHolder,
    watchState: WatchState,
    complicationSlotsManager: ComplicationSlotsManager,
    currentUserStyleRepository: CurrentUserStyleRepository,
    resourceOnlyWatchFacePackageName: String
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Inherited functions

From android.content.Context
open Boolean
bindIsolatedService(
    p0: Intent,
    p1: Context.BindServiceFlags,
    p2: String,
    p3: Executor,
    p4: ServiceConnection
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Int

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

ColorStateList

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Drawable?

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

String

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

String
getString(p0: Int, vararg p1: Any)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

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

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

CharSequence
getText(p0: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

TypedArray

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

TypedArray

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

TypedArray

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

TypedArray
obtainStyledAttributes(p0: AttributeSet?, p1: IntArray, p2: Int, p3: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

From android.content.ContextWrapper
open Boolean
bindIsolatedService(
    p0: Intent,
    p1: Int,
    p2: String,
    p3: Executor,
    p4: ServiceConnection
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean
bindService(
    p0: Intent,
    p1: ServiceConnection,
    p2: Context.BindServiceFlags
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean
bindService(
    p0: Intent,
    p1: Context.BindServiceFlags,
    p2: Executor,
    p3: ServiceConnection
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean
bindService(p0: Intent, p1: Int, p2: Executor, p3: ServiceConnection)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean
bindServiceAsUser(
    p0: Intent,
    p1: ServiceConnection,
    p2: Context.BindServiceFlags,
    p3: UserHandle
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Int

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Int

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open IntArray

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Int

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Int

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open IntArray

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Int
checkContentUriPermissionFull(p0: Uri, p1: Int, p2: Int, p3: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Int
checkPermission(p0: String, p1: Int, p2: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Int

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Int
checkUriPermission(p0: Uri, p1: Int, p2: Int, p3: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Int
checkUriPermission(p0: Uri?, p1: String?, p2: String?, p3: Int, p4: Int, p5: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open IntArray
checkUriPermissions(p0: MutableList<Uri>, p1: Int, p2: Int, p3: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. Deprecated in Java

open Context

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Context

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Context

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Context

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Context

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Context

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Context

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Context

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Context

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Context
createWindowContext(p0: Display, p1: Int, p2: Bundle?)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Array<String>

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
enforcePermission(p0: String, p1: Int, p2: Int, p3: String?)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
enforceUriPermission(p0: Uri, p1: Int, p2: Int, p3: Int, p4: String)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
enforceUriPermission(
    p0: Uri?,
    p1: String?,
    p2: String?,
    p3: Int,
    p4: Int,
    p5: Int,
    p6: String?
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Array<String>

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Context

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open ApplicationInfo

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open AssetManager

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open AttributionSource

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open String?

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Context

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open File

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open ClassLoader

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open File

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open ContentResolver

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open File

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open File

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Int

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open File
getDir(p0: String, p1: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Display?

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open File?

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Array<File>

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open File?

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Array<File>

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Array<File>

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open File

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open File

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Executor

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Looper

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open File

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open File

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Array<File>

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open String

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open String

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open PackageManager

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open String

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open String

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open ContextParams?

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Resources

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open SharedPreferences

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Any

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open String?

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Resources.Theme

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Drawable

This function is deprecated. Deprecated in Java

open Int

This function is deprecated. Deprecated in Java

open Int

This function is deprecated. Deprecated in Java

open Unit
grantUriPermission(p0: String, p1: Uri, p2: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open FileInputStream

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open FileOutputStream

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open SQLiteDatabase

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open SQLiteDatabase
openOrCreateDatabase(
    p0: String,
    p1: Int,
    p2: SQLiteDatabase.CursorFactory,
    p3: DatabaseErrorHandler?
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Drawable

This function is deprecated. Deprecated in Java

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Intent?

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Intent?

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Intent?
registerReceiver(
    p0: BroadcastReceiver?,
    p1: IntentFilter,
    p2: String?,
    p3: Handler?
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Intent?
registerReceiver(
    p0: BroadcastReceiver?,
    p1: IntentFilter,
    p2: String?,
    p3: Handler?,
    p4: Int
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. Deprecated in Java

open Unit

This function is deprecated. Deprecated in Java

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
revokeUriPermission(p0: String, p1: Uri, p2: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
sendBroadcast(p0: Intent, p1: String?, p2: Bundle?)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
sendOrderedBroadcast(
    p0: Intent,
    p1: String?,
    p2: BroadcastReceiver?,
    p3: Handler?,
    p4: Int,
    p5: String?,
    p6: Bundle?
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
sendOrderedBroadcast(
    p0: Intent,
    p1: String?,
    p2: Bundle?,
    p3: BroadcastReceiver?,
    p4: Handler?,
    p5: Int,
    p6: String?,
    p7: Bundle?
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
sendOrderedBroadcast(
    p0: Intent,
    p1: String?,
    p2: String?,
    p3: BroadcastReceiver?,
    p4: Handler?,
    p5: Int,
    p6: String?,
    p7: Bundle?
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
sendOrderedBroadcast(
    p0: Intent,
    p1: Int,
    p2: String?,
    p3: String?,
    p4: BroadcastReceiver?,
    p5: Handler?,
    p6: String?,
    p7: Bundle?,
    p8: Bundle?
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
sendOrderedBroadcastAsUser(
    p0: Intent,
    p1: UserHandle,
    p2: String?,
    p3: BroadcastReceiver?,
    p4: Handler?,
    p5: Int,
    p6: String?,
    p7: Bundle?
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. Deprecated in Java

open Unit

This function is deprecated. Deprecated in Java

open Unit

This function is deprecated. Deprecated in Java

open Unit
sendStickyOrderedBroadcast(
    p0: Intent,
    p1: BroadcastReceiver?,
    p2: Handler?,
    p3: Int,
    p4: String?,
    p5: Bundle?
)

This function is deprecated. Deprecated in Java

open Unit
sendStickyOrderedBroadcastAsUser(
    p0: Intent,
    p1: UserHandle,
    p2: BroadcastReceiver?,
    p3: Handler?,
    p4: Int,
    p5: String?,
    p6: Bundle?
)

This function is deprecated. Deprecated in Java

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. Deprecated in Java

open Unit

This function is deprecated. Deprecated in Java

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open ComponentName?

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
startIntentSender(p0: IntentSender, p1: Intent?, p2: Int, p3: Int, p4: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
startIntentSender(
    p0: IntentSender,
    p1: Intent?,
    p2: Int,
    p3: Int,
    p4: Int,
    p5: Bundle?
)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open ComponentName?

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

From android.app.Service
open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Application

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Int

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
onStart(p0: Intent, p1: Int)

This function is deprecated. Deprecated in Java

open Int
onStartCommand(p0: Intent, p1: Int, p2: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
onTimeout(p0: Int, p1: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Unit
startForeground(p0: Int, p1: Notification, p2: Int)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Boolean

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

From android.service.wallpaper.WallpaperService
final IBinder?

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

From androidx.wear.watchface.WatchFaceService
open Unit
@UiThread
dump(fd: FileDescriptor, writer: PrintWriter, args: Array<String>)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Handler

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open ComplicationSlotInflationFactory?

This function is deprecated. Use the version with currentUserStyleRepository argument instead

open ComplicationSlotInflationFactory

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Handler

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final WallpaperService.Engine

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public constructors

WatchFaceRuntimeService

Added in 1.2.0
Deprecated in 1.3.0-alpha06
WatchFaceRuntimeService()

Protected functions

createComplicationSlotsManager

protected final fun createComplicationSlotsManager(
    currentUserStyleRepository: CurrentUserStyleRepository
): ComplicationSlotsManager

If the WatchFaceService's manifest doesn't define a androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override this factory method to create a non-empty ComplicationSlotsManager. This manager will be passed to createUserStyleFlavors and createWatchFace. This will be called from a background thread but the ComplicationSlotsManager should be accessed exclusively from the UiThread afterwards.

Parameters
currentUserStyleRepository: CurrentUserStyleRepository

The CurrentUserStyleRepository constructed using the UserStyleSchema returned by createUserStyleSchema.

createComplicationSlotsManager

Added in 1.2.0
Deprecated in 1.3.0-alpha06
@WorkerThread
protected abstract fun createComplicationSlotsManager(
    currentUserStyleRepository: CurrentUserStyleRepository,
    resourceOnlyWatchFacePackageName: String
): ComplicationSlotsManager

If the WatchFaceService's manifest doesn't define an androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override this factory method to create a non-empty ComplicationSlotsManager. This manager will be passed to createUserStyleFlavors and createWatchFace. This will be called from a background thread but the ComplicationSlotsManager should be accessed exclusively from the UiThread afterwards.

Parameters
currentUserStyleRepository: CurrentUserStyleRepository

The CurrentUserStyleRepository constructed using the UserStyleSchema returned by createUserStyleSchema.

resourceOnlyWatchFacePackageName: String

The android package from which the watch face definition should be loaded.

createUserStyleFlavors

protected final fun createUserStyleFlavors(
    currentUserStyleRepository: CurrentUserStyleRepository,
    complicationSlotsManager: ComplicationSlotsManager
): UserStyleFlavors

If the WatchFaceService's manifest doesn't define a androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override this factory method to create non-empty UserStyleFlavors. This is called on a background thread. The system reads the flavors once and changes may be ignored until the APK is updated. Metadata tag "androidx.wear.watchface.FLAVORS_SUPPORTED" should be added to let the system know the service supports flavors.

Parameters
currentUserStyleRepository: CurrentUserStyleRepository

The CurrentUserStyleRepository constructed using the UserStyleSchema returned by createUserStyleSchema.

complicationSlotsManager: ComplicationSlotsManager

The ComplicationSlotsManager returned by createComplicationSlotsManager

Returns
UserStyleFlavors

The UserStyleFlavors, which is exposed to the system.

createUserStyleFlavors

Added in 1.2.0
Deprecated in 1.3.0-alpha06
@WorkerThread
protected abstract fun createUserStyleFlavors(
    currentUserStyleRepository: CurrentUserStyleRepository,
    complicationSlotsManager: ComplicationSlotsManager,
    resourceOnlyWatchFacePackageName: String
): UserStyleFlavors

If the WatchFaceService's manifest doesn't define an androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override this factory method to create non-empty UserStyleFlavors. This is called on a background thread. The system reads the flavors once and changes may be ignored until the APK is updated. Metadata tag "androidx.wear.watchface.FLAVORS_SUPPORTED" should be added to let the system know the service supports flavors.

Parameters
currentUserStyleRepository: CurrentUserStyleRepository

The CurrentUserStyleRepository constructed using the UserStyleSchema returned by createUserStyleSchema.

complicationSlotsManager: ComplicationSlotsManager

The ComplicationSlotsManager returned by createComplicationSlotsManager

resourceOnlyWatchFacePackageName: String

The android package from which the watch face definition should be loaded.

Returns
UserStyleFlavors

The UserStyleFlavors, which is exposed to the system.

createUserStyleSchema

protected final fun createUserStyleSchema(): UserStyleSchema

If the WatchFaceService's manifest doesn't define an androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override this factory method to create a non-empty UserStyleSchema. A CurrentUserStyleRepository constructed with this schema will be passed to createComplicationSlotsManager, createUserStyleFlavors and createWatchFace. This is called on a background thread.

createUserStyleSchema

Added in 1.2.0
Deprecated in 1.3.0-alpha06
@WorkerThread
protected abstract fun createUserStyleSchema(resourceOnlyWatchFacePackageName: String): UserStyleSchema

If the WatchFaceService's manifest doesn't define a androidx.wear.watchface.XmlSchemaAndComplicationSlotsDefinition meta data tag then override this factory method to create a non-empty UserStyleSchema. A CurrentUserStyleRepository constructed with this schema will be passed to createComplicationSlotsManager, createUserStyleFlavors and createWatchFace. This is called on a background thread.

Parameters
resourceOnlyWatchFacePackageName: String

The android package from which the watch face definition should be loaded.

createWatchFace

protected final suspend fun createWatchFace(
    surfaceHolder: SurfaceHolder,
    watchState: WatchState,
    complicationSlotsManager: ComplicationSlotsManager,
    currentUserStyleRepository: CurrentUserStyleRepository
): WatchFace

Override this factory method to create your WatchFaceImpl. This method will be called by the library on a background thread, if possible any expensive initialization should be done asynchronously. The WatchFace and its Renderer should be accessed exclusively from the UiThread afterwards. There is a memory barrier between construction and rendering so no special threading primitives are required.

Warning the system will likely time out waiting for watch face initialization if it takes longer than MAX_CREATE_WATCHFACE_TIME_MILLIS milliseconds.

Parameters
surfaceHolder: SurfaceHolder

The SurfaceHolder to pass to the Renderer's constructor.

watchState: WatchState

The WatchState for the watch face.

complicationSlotsManager: ComplicationSlotsManager

The ComplicationSlotsManager returned by createComplicationSlotsManager.

currentUserStyleRepository: CurrentUserStyleRepository

The CurrentUserStyleRepository constructed using the UserStyleSchema returned by createUserStyleSchema.

Returns
WatchFace

A WatchFace whose Renderer uses the provided surfaceHolder.

createWatchFace

@WorkerThread
protected abstract suspend fun createWatchFace(
    surfaceHolder: SurfaceHolder,
    watchState: WatchState,
    complicationSlotsManager: ComplicationSlotsManager,
    currentUserStyleRepository: CurrentUserStyleRepository,
    resourceOnlyWatchFacePackageName: String
): WatchFace

Override this factory method to create your WatchFaceImpl. This method will be called by the library on a background thread, if possible any expensive initialization should be done asynchronously. The WatchFace and its Renderer should be accessed exclusively from the UiThread afterwards. There is a memory barrier between construction and rendering so no special threading primitives are required.

Warning the system will likely time out waiting for watch face initialization if it takes longer than WatchFaceService.MAX_CREATE_WATCHFACE_TIME_MILLIS milliseconds.

Parameters
surfaceHolder: SurfaceHolder

The SurfaceHolder to pass to the Renderer's constructor.

watchState: WatchState

The WatchState for the watch face.

complicationSlotsManager: ComplicationSlotsManager

The ComplicationSlotsManager returned by createComplicationSlotsManager.

currentUserStyleRepository: CurrentUserStyleRepository

The CurrentUserStyleRepository constructed using the UserStyleSchema returned by createUserStyleSchema.

resourceOnlyWatchFacePackageName: String

The android package from which the watch face definition should be loaded.

Returns
WatchFace

A WatchFace whose Renderer uses the provided surfaceHolder.