ListenableStatefulWatchFaceService


public abstract class ListenableStatefulWatchFaceService<Extra extends Object> extends StatefulWatchFaceService


ListenableFuture-based compatibility wrapper around StatefulWatchFaceService's suspending WatchFaceService.createWatchFace.

ListenableWatchFaceService is required to be stateless as multiple can be created in parallel. ListenableStatefulWatchFaceService allows for metadata to be associated with watch faces on a per instance basis. This state is created by createExtra and is passed into other methods.

use Watch Face Format instead

Summary

Public constructors

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

Protected methods

@NonNull WatchFace
createWatchFace(
    @NonNull SurfaceHolder surfaceHolder,
    @NonNull WatchState watchState,
    @NonNull ComplicationSlotsManager complicationSlotsManager,
    @NonNull CurrentUserStyleRepository currentUserStyleRepository,
    @NonNull Extra extra
)

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

abstract @NonNull ListenableFuture<@NonNull WatchFace>
createWatchFaceFuture(
    @NonNull SurfaceHolder surfaceHolder,
    @NonNull WatchState watchState,
    @NonNull ComplicationSlotsManager complicationSlotsManager,
    @NonNull CurrentUserStyleRepository currentUserStyleRepository,
    @NonNull Extra extra
)

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

Inherited methods

From android.content.ComponentCallbacks
void

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

From android.content.ComponentCallbacks2
void
onTrimMemory(int level)

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

From android.content.Context
boolean
bindIsolatedService(
    @NonNull Intent service,
    @NonNull Context.BindServiceFlags flags,
    @NonNull String instanceName,
    @NonNull Executor executor,
    @NonNull ServiceConnection conn
)

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

boolean
bindIsolatedService(
    @NonNull Intent service,
    int flags,
    @NonNull String instanceName,
    @NonNull Executor executor,
    @NonNull ServiceConnection conn
)

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

boolean
bindService(
    @NonNull Intent service,
    @NonNull ServiceConnection conn,
    @NonNull Context.BindServiceFlags flags
)

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

boolean
bindService(
    @NonNull Intent service,
    @NonNull ServiceConnection conn,
    int flags
)

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

boolean
bindService(
    @NonNull Intent service,
    @NonNull Context.BindServiceFlags flags,
    @NonNull Executor executor,
    @NonNull ServiceConnection conn
)

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

boolean
bindService(
    @NonNull Intent service,
    int flags,
    @NonNull Executor executor,
    @NonNull ServiceConnection conn
)

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

boolean
bindServiceAsUser(
    @NonNull Intent service,
    @NonNull ServiceConnection conn,
    @NonNull Context.BindServiceFlags flags,
    @NonNull UserHandle user
)

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

boolean
bindServiceAsUser(
    @NonNull Intent service,
    @NonNull ServiceConnection conn,
    int flags,
    @NonNull UserHandle user
)

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

int

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

int

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

@NonNull int[]
checkCallingOrSelfUriPermissions(
    @NonNull List<@NonNull Uri> uris,
    int modeFlags
)

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

int

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

int
checkCallingUriPermission(@NonNull Uri uri, int modeFlags)

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

@NonNull int[]

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

int
checkContentUriPermissionFull(
    @NonNull Uri uri,
    int pid,
    int uid,
    int modeFlags
)

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

int
checkPermission(@NonNull String permission, int pid, int uid)

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

int

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

int
checkUriPermission(@NonNull Uri uri, int pid, int uid, int modeFlags)

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

int
checkUriPermission(
    @Nullable Uri uri,
    @Nullable String readPermission,
    @Nullable String writePermission,
    int pid,
    int uid,
    int modeFlags
)

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

@NonNull int[]
checkUriPermissions(
    @NonNull List<@NonNull Uri> uris,
    int pid,
    int uid,
    int modeFlags
)

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

void

This method is deprecated. Deprecated in Java

@NonNull Context

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

@NonNull Context

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

@NonNull Context

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

@NonNull Context

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

@NonNull Context
createDeviceContext(int deviceId)

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

@NonNull Context

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

@NonNull Context

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

@NonNull Context
createPackageContext(@NonNull String packageName, int flags)

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

@NonNull Context
createWindowContext(int type, @Nullable Bundle options)

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

@NonNull Context
createWindowContext(
    @NonNull Display display,
    int type,
    @Nullable Bundle options
)

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

@NonNull String[]

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

boolean

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

boolean

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

boolean

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

void
enforceCallingOrSelfPermission(
    @NonNull String permission,
    @Nullable String message
)

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

void
enforceCallingOrSelfUriPermission(
    @NonNull Uri uri,
    int modeFlags,
    @NonNull String message
)

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

void
enforceCallingPermission(
    @NonNull String permission,
    @Nullable String message
)

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

void
enforceCallingUriPermission(
    @NonNull Uri uri,
    int modeFlags,
    @NonNull String message
)

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

void
enforcePermission(
    @NonNull String permission,
    int pid,
    int uid,
    @Nullable String message
)

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

void
enforceUriPermission(
    @NonNull Uri uri,
    int pid,
    int uid,
    int modeFlags,
    @NonNull String message
)

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

void
enforceUriPermission(
    @Nullable Uri uri,
    @Nullable String readPermission,
    @Nullable String writePermission,
    int pid,
    int uid,
    int modeFlags,
    @Nullable String message
)

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

@NonNull String[]

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

final int
getColor(int id)

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

final @NonNull ColorStateList

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

@NonNull File

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

@NonNull File
getDir(@NonNull String name, int mode)

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

final @Nullable Drawable
getDrawable(int id)

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

@Nullable File

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

@NonNull File[]

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

@NonNull File

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

@NonNull SharedPreferences
getSharedPreferences(@NonNull String name, int mode)

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

final @NonNull String
getString(int resId)

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

final @NonNull String
getString(int resId, @NonNull Object... formatArgs)

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

@NonNull Object

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

final @NonNull T
<T extends Object> getSystemService(@NonNull Class<@NonNull T> serviceClass)

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

String

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

final @NonNull CharSequence
getText(int resId)

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

void
grantUriPermission(
    @NonNull String toPackage,
    @NonNull Uri uri,
    int modeFlags
)

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

boolean
moveDatabaseFrom(@NonNull Context sourceContext, @NonNull String name)

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

boolean
moveSharedPreferencesFrom(
    @NonNull Context sourceContext,
    @NonNull String name
)

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

final @NonNull TypedArray

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

final @NonNull TypedArray
obtainStyledAttributes(int resid, @NonNull int[] attrs)

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

final @NonNull TypedArray

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

final @NonNull TypedArray
obtainStyledAttributes(
    @Nullable AttributeSet set,
    @NonNull int[] attrs,
    int defStyleAttr,
    int defStyleRes
)

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

@NonNull FileInputStream

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

@NonNull FileOutputStream
openFileOutput(@NonNull String name, int mode)

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

@NonNull SQLiteDatabase
openOrCreateDatabase(
    @NonNull String name,
    int mode,
    @NonNull SQLiteDatabase.CursorFactory factory
)

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

@NonNull SQLiteDatabase
openOrCreateDatabase(
    @NonNull String name,
    int mode,
    @NonNull SQLiteDatabase.CursorFactory factory,
    @Nullable DatabaseErrorHandler errorHandler
)

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

@NonNull Drawable

This method is deprecated. Deprecated in Java

void

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

void
registerDeviceIdChangeListener(
    @NonNull Executor executor,
    @NonNull IntConsumer listener
)

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

Intent
registerReceiver(
    @Nullable BroadcastReceiver receiver,
    @NonNull IntentFilter filter
)

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

Intent
registerReceiver(
    @Nullable BroadcastReceiver receiver,
    @NonNull IntentFilter filter,
    int flags
)

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

Intent
registerReceiver(
    @Nullable BroadcastReceiver receiver,
    @NonNull IntentFilter filter,
    @Nullable String broadcastPermission,
    @Nullable Handler scheduler
)

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

Intent
registerReceiver(
    @Nullable BroadcastReceiver receiver,
    @NonNull IntentFilter filter,
    @Nullable String broadcastPermission,
    @Nullable Handler scheduler,
    int flags
)

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

void

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void

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

void

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

void
revokeUriPermission(@NonNull Uri uri, int modeFlags)

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

void
revokeUriPermission(
    @NonNull String targetPackage,
    @NonNull Uri uri,
    int modeFlags
)

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

void

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

void
sendBroadcast(@NonNull Intent intent, @Nullable String receiverPermission)

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

void
sendBroadcast(
    @NonNull Intent intent,
    @Nullable String receiverPermission,
    @Nullable Bundle options
)

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

void

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

void
sendBroadcastAsUser(
    @NonNull Intent intent,
    @NonNull UserHandle user,
    String receiverPermission
)

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

void
sendBroadcastWithMultiplePermissions(
    @NonNull Intent intent,
    @NonNull String[] receiverPermissions
)

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

void
sendOrderedBroadcast(
    @NonNull Intent intent,
    @Nullable String receiverPermission
)

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

void
sendOrderedBroadcast(
    @NonNull Intent intent,
    @Nullable String receiverPermission,
    @Nullable Bundle options
)

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

void
sendOrderedBroadcast(
    @NonNull Intent intent,
    @Nullable String receiverPermission,
    @Nullable BroadcastReceiver resultReceiver,
    @Nullable Handler scheduler,
    int initialCode,
    @Nullable String initialData,
    @Nullable Bundle initialExtras
)

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

void
sendOrderedBroadcast(
    @NonNull Intent intent,
    @Nullable String receiverPermission,
    @Nullable Bundle options,
    @Nullable BroadcastReceiver resultReceiver,
    @Nullable Handler scheduler,
    int initialCode,
    @Nullable String initialData,
    @Nullable Bundle initialExtras
)

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

void
sendOrderedBroadcast(
    @NonNull Intent intent,
    @Nullable String receiverPermission,
    @Nullable String receiverAppOp,
    @Nullable BroadcastReceiver resultReceiver,
    @Nullable Handler scheduler,
    int initialCode,
    @Nullable String initialData,
    @Nullable Bundle initialExtras
)

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

void
sendOrderedBroadcastAsUser(
    @NonNull Intent intent,
    @NonNull UserHandle user,
    @Nullable String receiverPermission,
    @Nullable BroadcastReceiver resultReceiver,
    @Nullable Handler scheduler,
    int initialCode,
    @Nullable String initialData,
    @Nullable Bundle initialExtras
)

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

void

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void
sendStickyOrderedBroadcast(
    @NonNull Intent intent,
    @Nullable BroadcastReceiver resultReceiver,
    @Nullable Handler scheduler,
    int initialCode,
    @Nullable String initialData,
    @Nullable Bundle initialExtras
)

This method is deprecated. Deprecated in Java

void
sendStickyOrderedBroadcastAsUser(
    @NonNull Intent intent,
    @NonNull UserHandle user,
    @Nullable BroadcastReceiver resultReceiver,
    @Nullable Handler scheduler,
    int initialCode,
    @Nullable String initialData,
    @Nullable Bundle initialExtras
)

This method is deprecated. Deprecated in Java

void
setTheme(int resid)

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

void

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void
startActivities(@NonNull Intent[] intents)

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

void
startActivities(@NonNull Intent[] intents, @Nullable Bundle options)

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

void

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

void

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

@Nullable ComponentName

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

boolean
startInstrumentation(
    @NonNull ComponentName className,
    @Nullable String profileFile,
    @Nullable Bundle arguments
)

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

void
startIntentSender(
    @NonNull IntentSender intent,
    @Nullable Intent fillInIntent,
    int flagsMask,
    int flagsValues,
    int extraFlags
)

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

void
startIntentSender(
    @NonNull IntentSender intent,
    @Nullable Intent fillInIntent,
    int flagsMask,
    int flagsValues,
    int extraFlags,
    @Nullable Bundle options
)

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

@Nullable ComponentName

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

boolean

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

void

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

void

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

void

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

void

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

void
updateServiceGroup(
    @NonNull ServiceConnection conn,
    int group,
    int importance
)

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

From android.content.ContextWrapper
void

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

@NonNull Context

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

@NonNull ApplicationInfo

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

@NonNull AssetManager

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

@NonNull AttributionSource

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

@Nullable String

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

@NonNull Context

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

@NonNull File

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

@NonNull ClassLoader

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

@NonNull File

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

@NonNull ContentResolver

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

@NonNull File

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

int

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

@Nullable Display

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

@Nullable File

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

@NonNull File[]

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

@NonNull File[]

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

@NonNull File

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

@NonNull Executor

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

@NonNull Looper

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

@NonNull File

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

@NonNull File

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

@NonNull File[]

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

@NonNull String

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

@NonNull String

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

@NonNull PackageManager

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

@NonNull String

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

@NonNull String

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

@Nullable ContextParams

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

@NonNull Resources

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

@NonNull Resources.Theme

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

@NonNull Drawable

This method is deprecated. Deprecated in Java

int

This method is deprecated. Deprecated in Java

int

This method is deprecated. Deprecated in Java

boolean

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

boolean

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

boolean

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

void
sendOrderedBroadcast(
    @NonNull Intent intent,
    int initialCode,
    @Nullable String receiverPermission,
    @Nullable String receiverAppOp,
    @Nullable BroadcastReceiver resultReceiver,
    @Nullable Handler scheduler,
    @Nullable String initialData,
    @Nullable Bundle initialExtras,
    @Nullable Bundle options
)

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

From android.app.Service
final @NonNull Application

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

final int

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

final IBinder

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

void

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

void

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

void

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

void
onStart(@NonNull Intent intent, int startId)

This method is deprecated. Deprecated in Java

int
onStartCommand(@NonNull Intent intent, int flags, int startId)

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

void

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

void
onTimeout(int startId)

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

void
onTimeout(int startId, int fgsType)

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

boolean

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

final void
startForeground(int id, @NonNull Notification notification)

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

final void
startForeground(
    int id,
    @NonNull Notification notification,
    int foregroundServiceType
)

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

final void
stopForeground(int notificationBehavior)

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

final void
stopForeground(boolean removeNotification)

This method is deprecated. Deprecated in Java

final void

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

final void
stopSelf(int startId)

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

final boolean
stopSelfResult(int startId)

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

From androidx.wear.watchface.StatefulWatchFaceService
final @NonNull ComplicationSlotsManager

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

@NonNull ComplicationSlotsManager
@WorkerThread
createComplicationSlotsManager(
    @NonNull CurrentUserStyleRepository currentUserStyleRepository,
    @NonNull Extra extra
)

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

abstract @NonNull Extra

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

final @NonNull UserStyleFlavors
createUserStyleFlavors(
    @NonNull CurrentUserStyleRepository currentUserStyleRepository,
    @NonNull ComplicationSlotsManager complicationSlotsManager
)

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

@NonNull UserStyleFlavors
@WorkerThread
createUserStyleFlavors(
    @NonNull CurrentUserStyleRepository currentUserStyleRepository,
    @NonNull ComplicationSlotsManager complicationSlotsManager,
    @NonNull Extra extra
)

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

final @NonNull UserStyleSchema

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

@NonNull UserStyleSchema

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

final @NonNull WatchFace
createWatchFace(
    @NonNull SurfaceHolder surfaceHolder,
    @NonNull WatchState watchState,
    @NonNull ComplicationSlotsManager complicationSlotsManager,
    @NonNull CurrentUserStyleRepository currentUserStyleRepository
)

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

final @NonNull ComplicationSlotInflationFactory

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

@NonNull ComplicationSlotInflationFactory
@WorkerThread
getComplicationSlotInflationFactory(
    @NonNull CurrentUserStyleRepository currentUserStyleRepository,
    @NonNull Extra extra
)

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

From android.service.wallpaper.WallpaperService
@Nullable WallpaperService.Engine

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

From androidx.wear.watchface.WatchFaceService
void
@UiThread
dump(
    @NonNull FileDescriptor fd,
    @NonNull PrintWriter writer,
    @NonNull String[] args
)

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

final @NonNull Handler

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

ComplicationSlotInflationFactory

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

final @NonNull Handler

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

void

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

final @NonNull WallpaperService.Engine

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

Public constructors

ListenableStatefulWatchFaceService

public <Extra extends Object> ListenableStatefulWatchFaceService()

Protected methods

createWatchFace

protected @NonNull WatchFace createWatchFace(
    @NonNull SurfaceHolder surfaceHolder,
    @NonNull WatchState watchState,
    @NonNull ComplicationSlotsManager complicationSlotsManager,
    @NonNull CurrentUserStyleRepository currentUserStyleRepository,
    @NonNull Extra extra
)

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
@NonNull SurfaceHolder surfaceHolder

The SurfaceHolder to pass to the Renderer's constructor.

@NonNull WatchState watchState

The WatchState for the watch face.

@NonNull ComplicationSlotsManager complicationSlotsManager

The ComplicationSlotsManager returned by createComplicationSlotsManager.

@NonNull CurrentUserStyleRepository currentUserStyleRepository

The CurrentUserStyleRepository constructed using the UserStyleSchema returned by createUserStyleSchema.

@NonNull Extra extra

The object returned by createExtra.

Returns
@NonNull WatchFace

A WatchFace whose Renderer uses the provided surfaceHolder.

createWatchFaceFuture

Added in 1.3.0-alpha07
Deprecated in 1.3.0-alpha07
protected abstract @NonNull ListenableFuture<@NonNull WatchFacecreateWatchFaceFuture(
    @NonNull SurfaceHolder surfaceHolder,
    @NonNull WatchState watchState,
    @NonNull ComplicationSlotsManager complicationSlotsManager,
    @NonNull CurrentUserStyleRepository currentUserStyleRepository,
    @NonNull Extra extra
)

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.

Note cancellation of the returned future is not supported.

Parameters
@NonNull SurfaceHolder surfaceHolder

The SurfaceHolder to pass to the Renderer's constructor.

@NonNull WatchState watchState

The WatchState for the watch face.

@NonNull ComplicationSlotsManager complicationSlotsManager

The ComplicationSlotsManager returned by createComplicationSlotsManager.

@NonNull CurrentUserStyleRepository currentUserStyleRepository

The CurrentUserStyleRepository constructed using the UserStyleSchema returned by createUserStyleSchema.

@NonNull Extra extra

The object returned by createExtra.