WatchFacePushManager.SetWatchFaceAsActiveException


public final class WatchFacePushManager.SetWatchFaceAsActiveException extends Exception


An exception that can be thrown by setWatchFaceAsActive

Summary

Constants

static final int

The slot ID provided is not valid.

static final int

The maximum number of attempts to set the watch face as active has been reached.

static final int

The required permission to set the watch face as active is missing.

static final int

Unknown error while setting a watch face as active.

Public constructors

SetWatchFaceAsActiveException(int errorCode, Throwable rootCause)

Public methods

final int

The specific subtype of error occurred.

String

Constants

ERROR_INVALID_SLOT_ID

public static final int ERROR_INVALID_SLOT_ID

The slot ID provided is not valid. The watch face might have been removed previously, or the ID is simply incorrect. Make sure to retrieve slot IDs by calling listWatchFaces or addWatchFace.

ERROR_MAXIMUM_ATTEMPTS_REACHED

public static final int ERROR_MAXIMUM_ATTEMPTS_REACHED

The maximum number of attempts to set the watch face as active has been reached.

ERROR_MISSING_PERMISSION

public static final int ERROR_MISSING_PERMISSION = 1000

The required permission to set the watch face as active is missing.

ERROR_UNKNOWN

public static final int ERROR_UNKNOWN

Unknown error while setting a watch face as active. Typically this means that the Watch Face Push service on the watch could not be accessed or that the watch may be in a bad state.

Public constructors

SetWatchFaceAsActiveException

Added in 1.0.0-alpha01
public SetWatchFaceAsActiveException(int errorCode, Throwable rootCause)
Parameters
int errorCode

The specific subtype of error occurred. See ErrorCode for the possible values.

Throwable rootCause

The exception that caused the problem in the first place.

Public methods

getErrorCode

Added in 1.0.0-alpha01
public final int getErrorCode()

The specific subtype of error occurred. See ErrorCode for the possible values.

getMessage

public String getMessage()