UserStyleSetting.Option.Id


class UserStyleSetting.Option.Id


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

Summary

Constants

const Int
MAX_LENGTH = 1024

Maximum length of the value field to ensure acceptable companion editing latency.

Public constructors

Id(value: ByteArray)
Id(value: String)

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

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

ByteArray

The ByteArray value of this Id.

Constants

MAX_LENGTH

const val MAX_LENGTH = 1024: Int

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
Id(value: ByteArray)
Parameters
value: ByteArray

The ByteArray value of this Id.

Id

Added in 1.0.0
Id(value: String)

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

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

value

Added in 1.0.0
val valueByteArray

The ByteArray value of this Id.