WatchFaceControlClient.Companion

object WatchFaceControlClient.Companion


Summary

Public methods

final @NonNull WatchFaceControlClient
createWatchFaceControlClient(
    Context context,
    String watchFacePackageName
)

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

Public methods

createWatchFaceControlClient

public final @NonNull WatchFaceControlClient createWatchFaceControlClient(
    Context context,
    String watchFacePackageName
)

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

Parameters
Context context

Calling application's Context.

String watchFacePackageName

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

Returns
@NonNull 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.