UserStyleSetting.Option.Id


public final class UserStyleSetting.Option.Id


Machine readable identifier for Options. The length of this identifier may not exceed MAX_LENGTH.

Summary

Constants

static final int
MAX_LENGTH = 1024

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

Public constructors

Id(@NonNull byte[] value)

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

Id(@NonNull String value)

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

Public methods

boolean
equals(Object other)

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

final @NonNull byte[]

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 String

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

Constants

MAX_LENGTH

public static final int MAX_LENGTH = 1024

Maximum length of the value field to ensure acceptable companion editing latency. Please note the UserStyleSchema and the UserStyleSetting are sent over bluetooth to the companion phone when editing, and that bandwidth is limited (2mbps is common). Best practice is to keep these Ids short, ideally under 10 bytes.

Note the UserStyle has a maximum size (UserStyle.MAXIMUM_SIZE_BYTES) and that Option Ids are a significant contributor to the overall size of a UserStyle.

Public constructors

Id

Added in 1.0.0
Deprecated in 1.3.0-alpha07
public Id(@NonNull byte[] value)
Parameters
@NonNull byte[] value

The ByteArray value of this Id.

Id

Added in 1.0.0
Deprecated in 1.3.0-alpha07
public Id(@NonNull String value)

Constructs an Id with a String encoded to a ByteArray by String.encodeToByteArray.

Public methods

equals

public boolean equals(Object other)

getValue

Added in 1.0.0
Deprecated in 1.3.0-alpha07
public final @NonNull byte[] getValue()

The ByteArray value of this Id.

hashCode

public int hashCode()

toString

public @NonNull String toString()