ListenableWatchFaceControlClient.Companion

object ListenableWatchFaceControlClient.Companion


Summary

Public methods

final @NonNull ListenableFuture<@NonNull ListenableWatchFaceControlClient>
createWatchFaceControlClient(
    @NonNull Context context,
    @NonNull String watchFacePackageName
)

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

Public methods

createWatchFaceControlClient

@NonNull
public final ListenableFuture<@NonNull ListenableWatchFaceControlClientcreateWatchFaceControlClient(
    @NonNull Context context,
    @NonNull String watchFacePackageName
)

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
@NonNull Context context

Calling application's Context.

@NonNull String watchFacePackageName

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

Returns
ListenableFuture<@NonNull ListenableWatchFaceControlClient>

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