WatchFacePushManager.UpdateWatchFaceException


public final class WatchFacePushManager.UpdateWatchFaceException extends Exception


An exception that can be thrown by updateWatchFace

Summary

Constants

static final int

The package name of the watch face is invalid.

static final int

The slot ID provided is not valid.

static final int

The validation token provided does not match the watch face.

static final int

The provided watch face is not a valid Android APK.

static final int

Unexpected content in the APK.

static final int

Unknown error while updating a watch face.

Public constructors

UpdateWatchFaceException(int errorCode, @NonNull Throwable rootCause)

Public methods

final int

The specific subtype of error occurred.

String

Constants

ERROR_INVALID_PACKAGE_NAME

public static final int ERROR_INVALID_PACKAGE_NAME

The package name of the watch face is invalid.

The package name of the watch face must start with the package name of the Watch Face Push client, followed by the 'watchfacepush' keyword, ending with the unique watch face name.

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. Developers should make sure to retrieve slot IDs by calling listWatchFaces or addWatchFace.

ERROR_INVALID_VALIDATION_TOKEN

public static final int ERROR_INVALID_VALIDATION_TOKEN

The validation token provided does not match the watch face. Please see the Watch Face Push documentation to see how to generate a validation token correctly.

ERROR_MALFORMED_WATCHFACE_APK

public static final int ERROR_MALFORMED_WATCHFACE_APK

The provided watch face is not a valid Android APK.

ERROR_UNEXPECTED_CONTENT

public static final int ERROR_UNEXPECTED_CONTENT

Unexpected content in the APK. The APK must be a WFF watchface which only contains the watchface XML file and the associated resources. The APK can't contain any executable code.

ERROR_UNKNOWN

public static final int ERROR_UNKNOWN

Unknown error while updating a watch face. 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

UpdateWatchFaceException

Added in 1.0.0-alpha01
public UpdateWatchFaceException(int errorCode, @NonNull Throwable rootCause)
Parameters
int errorCode

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

@NonNull 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()