Pebble App Framework: Phone API
    Preparing search index...

    Function payloadByKeyId

    • Copies a message from the watch so each key the face declares can be read by its number.

      Everything here reads a message by number, as in payload[messageKeys.SETTINGS_REQUEST]. The Pebble phone app hands PebbleKit JS a message keyed by name alone, such as SETTINGS_REQUEST. So a name the face declares gets its number beside it. A name in the array form, such as SLOT[1], is looked up through keyIdFor the same as a setting. The names stay, and a number already in the message is left as it came.

      Parameters

      • messageKeys: any

        The face's message_keys map.

      • payload: Record<string, any>

        The message as PebbleKit JS handed it over.

      Returns Record<string, any>

      A copy of the message with each declared key under its number as well as its name.