WatchFaceControlClient.Companion

object WatchFaceControlClient.Companion


Summary

Public functions

suspend WatchFaceControlClient
createWatchFaceControlClient(
    context: Context,
    watchFacePackageName: String
)

Constructs a WatchFaceControlClient which attempts to connect to a watch face in the android package watchFacePackageName.

Public functions

createWatchFaceControlClient

suspend fun createWatchFaceControlClient(
    context: Context,
    watchFacePackageName: String
): WatchFaceControlClient

Constructs a WatchFaceControlClient which attempts to connect to a watch face in the android package watchFacePackageName.

Parameters
context: Context

Calling application's Context.

watchFacePackageName: String

The name of the package containing the watch face control service to bind to.

Returns
WatchFaceControlClient

The WatchFaceControlClient if there is one.

Throws
androidx.wear.watchface.client.WatchFaceControlClient.ServiceNotBoundException

if the watch face control service can not be bound or a ServiceStartFailureException if the watch face dies during startup.