ListenableWatchFaceControlClient.Companion

object ListenableWatchFaceControlClient.Companion


Summary

Public functions

ListenableFuture<ListenableWatchFaceControlClient>
createWatchFaceControlClient(
    context: Context,
    watchFacePackageName: String
)

Returns a ListenableFuture for a ListenableWatchFaceControlClient which attempts to connect to a watch face in the android package watchFacePackageName.

Public functions

createWatchFaceControlClient

fun createWatchFaceControlClient(
    context: Context,
    watchFacePackageName: String
): ListenableFuture<ListenableWatchFaceControlClient>

Returns a ListenableFuture for a ListenableWatchFaceControlClient which attempts to connect to a watch face in the android package watchFacePackageName. Resolves as ServiceNotBoundException if the watch face control service can not be bound.

Note the returned future may resolve immediately on the calling thread or it may resolve asynchronously when the service is connected on a background thread.

Parameters
context: Context

Calling application's Context.

watchFacePackageName: String

Name of the package containing the watch face control service to bind to.

Returns
ListenableFuture<ListenableWatchFaceControlClient>

ListenableFuture<ListenableWatchFaceControlClient> which on success resolves to a ListenableWatchFaceControlClient or throws a ServiceNotBoundException if the watch face control service can not be bound.