pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • Examples
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

PebbleKit Android

  • Pebble C API
  • Pebble JavaScript API
  • PebbleKit JS
  • PebbleKit iOS
  • PebbleKit Android
  • com.getpebble.android.kit
    • Constants
    • PebbleKit
    • PebbleKit.FirmwareVersionInfo
    • PebbleKit.PebbleAckReceiver
    • PebbleKit.PebbleDataLogReceiver
    • PebbleKit.PebbleDataReceiver
    • PebbleKit.PebbleNackReceiver
    • Constants.PebbleAppType
    • Constants.PebbleDataType
  • com.getpebble.android.kit.util
    • PebbleDictionary
    • PebbleTuple
    • SportsState
    • PebbleDictionary.PebbleDictTypeException
    • PebbleDictionary.TupleOverflowException
    • PebbleTuple.ValueOverflowException

Constants

  • java.lang.Object
    • com.getpebble.android.kit.Constants


  • public final class Constants
    extends java.lang.Object
    Constant values used by PebbleKit-enabled android applications.
    • Nested Class Summary

      Modifier and Type Class and Description
      static class  Constants.PebbleAppType
      The Enum PebbleAppType.
      static class  Constants.PebbleDataType
      The Enum PebbleDataType.
    • Field Summary

      Modifier and Type Field and Description
      static java.lang.String APP_UUID
      The bundle-key used to store a message's UUID.
      static java.lang.String CUST_APP_TYPE
      The bundle-key used to store the type of application being customized in a CUSTOMIZE intent.
      static java.lang.String CUST_ICON
      The bundle-key used to store the custom icon provided in a CUSTOMIZE intent.
      static java.lang.String CUST_NAME
      The bundle-key used to store the custom name provided in a CUSTOMIZE intent.
      static java.lang.String DATA_LOG_TAG
      A bundle-key used to store the tag for the corresponding data log.
      static java.lang.String DATA_LOG_TIMESTAMP
      The bundle-key used to store the timestamp of when a data log was first created.
      static java.lang.String DATA_LOG_UUID
      A bundle-key used to store the UUID that uniquely identifies a data log.
      static int GOLF_BACK_KEY
      The Constant GOLF_BACK_KEY.
      static int GOLF_CMD_KEY
      The Constant GOLF_CMD_KEY.
      static int GOLF_CMD_NEXT
      Command sent by the golf-application to display the previous hole.
      static int GOLF_CMD_PREV
      Command sent by the golf-application to display the next hole.
      static int GOLF_FRONT_KEY
      The Constant GOLF_FRONT_KEY.
      static int GOLF_HOLE_KEY
      The Constant GOLF_HOLE_KEY.
      static int GOLF_MID_KEY
      The Constant GOLF_MID_KEY.
      static int GOLF_PAR_KEY
      The Constant GOLF_PAR_KEY.
      static java.util.UUID GOLF_UUID
      The UUID corresponding to Pebble's built-in "Golf" application.
      static java.lang.String INTENT_APP_ACK
      Intent broadcast to pebble.apk to indicate that a message was received from the watch.
      static java.lang.String INTENT_APP_CUSTOMIZE
      Intent broadcast to pebble.apk responsible for customizing the name and icon of the 'stock' Sports and Golf applications included in the watch's firmware.
      static java.lang.String INTENT_APP_NACK
      Intent broadcast to pebble.apk to indicate that a message was unsuccessfully received from the watch.
      static java.lang.String INTENT_APP_RECEIVE
      Intent broadcast from pebble.apk containing one-or-more key-value pairs sent from the watch to the phone.
      static java.lang.String INTENT_APP_RECEIVE_ACK
      Intent broadcast from pebble.apk indicating that a sent message was successfully received by a watch app.
      static java.lang.String INTENT_APP_RECEIVE_NACK
      Intent broadcast from pebble.apk indicating that a sent message was not received by a watch app.
      static java.lang.String INTENT_APP_SEND
      Intent broadcast to pebble.apk containing one-or-more key-value pairs to be sent to the watch from the phone.
      static java.lang.String INTENT_APP_START
      Intent broadcast to pebble.apk responsible for launching a watch-app on the connected watch.
      static java.lang.String INTENT_APP_STOP
      Intent broadcast to pebble.apk responsible for closing a running watch-app on the connected watch.
      static java.lang.String INTENT_DL_ACK_DATA
      Intent broadcast to pebble.apk implicitly when a unit of data from a data log is received.
      static java.lang.String INTENT_DL_FINISH_SESSION
      Intent broadcast from pebble.apk indicating the session has finished.
      static java.lang.String INTENT_DL_RECEIVE_DATA
      Intent broadcast from pebble.apk containing a unit of data from a data log.
      static java.lang.String INTENT_DL_REQUEST_DATA
      Intent broadcast to pebble.apk to request data logs for a particular app.
      static java.lang.String INTENT_PEBBLE_CONNECTED
      Intent broadcast by pebble.apk when a new connection to a Pebble is established.
      static java.lang.String INTENT_PEBBLE_DISCONNECTED
      Intent broadcast by pebble.apk when the connection to a Pebble is closed or lost.
      static int KIT_STATE_COLUMN_APPMSG_SUPPORT 
      static int KIT_STATE_COLUMN_CONNECTED 
      static int KIT_STATE_COLUMN_DATALOGGING_SUPPORT 
      static int KIT_STATE_COLUMN_VERSION_MAJOR 
      static int KIT_STATE_COLUMN_VERSION_MINOR 
      static int KIT_STATE_COLUMN_VERSION_POINT 
      static int KIT_STATE_COLUMN_VERSION_TAG 
      static java.lang.String MSG_DATA
      The bundle-key used to store a message's JSON payload send-to or received-from the watch.
      static java.lang.String PBL_DATA_ID
      A bundle-key used to store the ID of a unit of data in a data log.
      static java.lang.String PBL_DATA_OBJECT
      A bundle-key used to store the value of the data unit.
      static java.lang.String PBL_DATA_TYPE
      A bundle-key used to store the data type of the data unit.
      static int SPORTS_CUSTOM_LABEL_KEY
      The PebbleDictionary key corresponding to the custom label field sent to the Sports watch-app.
      static int SPORTS_CUSTOM_VALUE_KEY
      The PebbleDictionary key corresponding to the custom value sent to the Sports watch-app.
      static int SPORTS_DATA_KEY
      The PebbleDictionary key corresponding to the 'data' field sent to the Sports watch-app.
      static int SPORTS_DATA_PACE
      PebbleDictionary value corresponding to 'pace' data.
      static int SPORTS_DATA_SPEED
      PebbleDictionary value corresponding to 'speed' data.
      static int SPORTS_DISTANCE_KEY
      The PebbleDictionary key corresponding to the 'distance' field sent to the Sports watch-app.
      static int SPORTS_HR_BPM_KEY
      The PebbleDictionary key corresponding to the 'heart rate' field sent to the Sports watch-app.
      static int SPORTS_LABEL_KEY
      The PebbleDictionary key corresponding to the 'label' field sent to the Sports watch-app.
      static int SPORTS_STATE_END
      The Constant SPORTS_STATE_END.
      static int SPORTS_STATE_INIT
      The Constant SPORTS_STATE_INIT.
      static int SPORTS_STATE_KEY
      The PebbleDictionary key corresponding to the 'state' field sent to the Sports watch-app.
      static int SPORTS_STATE_PAUSED
      The Constant SPORTS_STATE_PAUSED.
      static int SPORTS_STATE_RUNNING
      The Constant SPORTS_STATE_RUNNING.
      static int SPORTS_TIME_KEY
      The PebbleDictionary key corresponding to the 'time' field sent to the Sports watch-app.
      static int SPORTS_UNITS_IMPERIAL
      PebbleDictionary value corresponding to 'imperial' units.
      static int SPORTS_UNITS_KEY
      The PebbleDictionary key corresponding to the 'units' field sent to the Sports watch-app.
      static int SPORTS_UNITS_METRIC
      PebbleDictionary value corresponding to 'metric' units.
      static java.util.UUID SPORTS_UUID
      The UUID corresponding to Pebble's built-in "Sports" application.
      static java.lang.String TRANSACTION_ID
      The bundle-key used to store a message's transaction id.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • INTENT_PEBBLE_CONNECTED

        public static final java.lang.String INTENT_PEBBLE_CONNECTED
        Intent broadcast by pebble.apk when a new connection to a Pebble is established.
        See Also:
        Constant Field Values
      • INTENT_PEBBLE_DISCONNECTED

        public static final java.lang.String INTENT_PEBBLE_DISCONNECTED
        Intent broadcast by pebble.apk when the connection to a Pebble is closed or lost.
        See Also:
        Constant Field Values
      • INTENT_APP_ACK

        public static final java.lang.String INTENT_APP_ACK
        Intent broadcast to pebble.apk to indicate that a message was received from the watch. To avoid protocol timeouts on the watch, applications must ACK or NACK all received messages.
        See Also:
        Constant Field Values
      • INTENT_APP_NACK

        public static final java.lang.String INTENT_APP_NACK
        Intent broadcast to pebble.apk to indicate that a message was unsuccessfully received from the watch.
        See Also:
        Constant Field Values
      • INTENT_APP_RECEIVE

        public static final java.lang.String INTENT_APP_RECEIVE
        Intent broadcast from pebble.apk containing one-or-more key-value pairs sent from the watch to the phone.
        See Also:
        Constant Field Values
      • INTENT_APP_RECEIVE_ACK

        public static final java.lang.String INTENT_APP_RECEIVE_ACK
        Intent broadcast from pebble.apk indicating that a sent message was successfully received by a watch app.
        See Also:
        Constant Field Values
      • INTENT_APP_RECEIVE_NACK

        public static final java.lang.String INTENT_APP_RECEIVE_NACK
        Intent broadcast from pebble.apk indicating that a sent message was not received by a watch app.
        See Also:
        Constant Field Values
      • INTENT_APP_SEND

        public static final java.lang.String INTENT_APP_SEND
        Intent broadcast to pebble.apk containing one-or-more key-value pairs to be sent to the watch from the phone.
        See Also:
        Constant Field Values
      • INTENT_APP_START

        public static final java.lang.String INTENT_APP_START
        Intent broadcast to pebble.apk responsible for launching a watch-app on the connected watch. This intent is idempotent.
        See Also:
        Constant Field Values
      • INTENT_APP_STOP

        public static final java.lang.String INTENT_APP_STOP
        Intent broadcast to pebble.apk responsible for closing a running watch-app on the connected watch. This intent is idempotent.
        See Also:
        Constant Field Values
      • INTENT_APP_CUSTOMIZE

        public static final java.lang.String INTENT_APP_CUSTOMIZE
        Intent broadcast to pebble.apk responsible for customizing the name and icon of the 'stock' Sports and Golf applications included in the watch's firmware.
        See Also:
        Constant Field Values
      • INTENT_DL_RECEIVE_DATA

        public static final java.lang.String INTENT_DL_RECEIVE_DATA
        Intent broadcast from pebble.apk containing a unit of data from a data log.
        See Also:
        Constant Field Values
      • INTENT_DL_ACK_DATA

        public static final java.lang.String INTENT_DL_ACK_DATA
        Intent broadcast to pebble.apk implicitly when a unit of data from a data log is received.
        See Also:
        Constant Field Values
      • INTENT_DL_REQUEST_DATA

        public static final java.lang.String INTENT_DL_REQUEST_DATA
        Intent broadcast to pebble.apk to request data logs for a particular app.
        See Also:
        Constant Field Values
      • INTENT_DL_FINISH_SESSION

        public static final java.lang.String INTENT_DL_FINISH_SESSION
        Intent broadcast from pebble.apk indicating the session has finished.
        See Also:
        Constant Field Values
      • SPORTS_UUID

        public static final java.util.UUID SPORTS_UUID
        The UUID corresponding to Pebble's built-in "Sports" application.
      • GOLF_UUID

        public static final java.util.UUID GOLF_UUID
        The UUID corresponding to Pebble's built-in "Golf" application.
      • TRANSACTION_ID

        public static final java.lang.String TRANSACTION_ID
        The bundle-key used to store a message's transaction id.
        See Also:
        Constant Field Values
      • APP_UUID

        public static final java.lang.String APP_UUID
        The bundle-key used to store a message's UUID.
        See Also:
        Constant Field Values
      • MSG_DATA

        public static final java.lang.String MSG_DATA
        The bundle-key used to store a message's JSON payload send-to or received-from the watch.
        See Also:
        Constant Field Values
      • CUST_APP_TYPE

        public static final java.lang.String CUST_APP_TYPE
        The bundle-key used to store the type of application being customized in a CUSTOMIZE intent.
        See Also:
        Constant Field Values
      • CUST_NAME

        public static final java.lang.String CUST_NAME
        The bundle-key used to store the custom name provided in a CUSTOMIZE intent.
        See Also:
        Constant Field Values
      • CUST_ICON

        public static final java.lang.String CUST_ICON
        The bundle-key used to store the custom icon provided in a CUSTOMIZE intent.
        See Also:
        Constant Field Values
      • DATA_LOG_TIMESTAMP

        public static final java.lang.String DATA_LOG_TIMESTAMP
        The bundle-key used to store the timestamp of when a data log was first created.
        See Also:
        Constant Field Values
      • DATA_LOG_UUID

        public static final java.lang.String DATA_LOG_UUID
        A bundle-key used to store the UUID that uniquely identifies a data log.
        See Also:
        Constant Field Values
      • DATA_LOG_TAG

        public static final java.lang.String DATA_LOG_TAG
        A bundle-key used to store the tag for the corresponding data log.
        See Also:
        Constant Field Values
      • PBL_DATA_ID

        public static final java.lang.String PBL_DATA_ID
        A bundle-key used to store the ID of a unit of data in a data log.
        See Also:
        Constant Field Values
      • PBL_DATA_TYPE

        public static final java.lang.String PBL_DATA_TYPE
        A bundle-key used to store the data type of the data unit.
        See Also:
        Constant Field Values
      • PBL_DATA_OBJECT

        public static final java.lang.String PBL_DATA_OBJECT
        A bundle-key used to store the value of the data unit.
        See Also:
        Constant Field Values
      • SPORTS_TIME_KEY

        public static final int SPORTS_TIME_KEY
        The PebbleDictionary key corresponding to the 'time' field sent to the Sports watch-app.
        See Also:
        Constant Field Values
      • SPORTS_DISTANCE_KEY

        public static final int SPORTS_DISTANCE_KEY
        The PebbleDictionary key corresponding to the 'distance' field sent to the Sports watch-app.
        See Also:
        Constant Field Values
      • SPORTS_DATA_KEY

        public static final int SPORTS_DATA_KEY
        The PebbleDictionary key corresponding to the 'data' field sent to the Sports watch-app. The data field is paired with the label specified by SPORTS_LABEL_KEY and can be used to display speed or pace data.
        See Also:
        Constant Field Values
      • SPORTS_UNITS_KEY

        public static final int SPORTS_UNITS_KEY
        The PebbleDictionary key corresponding to the 'units' field sent to the Sports watch-app.
        See Also:
        Constant Field Values
      • SPORTS_STATE_KEY

        public static final int SPORTS_STATE_KEY
        The PebbleDictionary key corresponding to the 'state' field sent to the Sports watch-app. Both the watch and phone-app may modify this field. The phone-application is responsible for performing any required state transitions to stay in sync with the watch-app's state.
        See Also:
        Constant Field Values
      • SPORTS_LABEL_KEY

        public static final int SPORTS_LABEL_KEY
        The PebbleDictionary key corresponding to the 'label' field sent to the Sports watch-app. The label field controls the label above the 'data' field.
        See Also:
        Constant Field Values
      • SPORTS_HR_BPM_KEY

        public static final int SPORTS_HR_BPM_KEY
        The PebbleDictionary key corresponding to the 'heart rate' field sent to the Sports watch-app. The heart rate field controls the data displayed in the scrollable field containing heart rate bpm.
        See Also:
        Constant Field Values
      • SPORTS_CUSTOM_LABEL_KEY

        public static final int SPORTS_CUSTOM_LABEL_KEY
        The PebbleDictionary key corresponding to the custom label field sent to the Sports watch-app. This label field controls the label above the custom value field.
        See Also:
        Constant Field Values
      • SPORTS_CUSTOM_VALUE_KEY

        public static final int SPORTS_CUSTOM_VALUE_KEY
        The PebbleDictionary key corresponding to the custom value sent to the Sports watch-app. The custom value field controls the data displayed in the scrollable field containing custom data.
        See Also:
        Constant Field Values
      • SPORTS_UNITS_IMPERIAL

        public static final int SPORTS_UNITS_IMPERIAL
        PebbleDictionary value corresponding to 'imperial' units.
        See Also:
        Constant Field Values
      • SPORTS_UNITS_METRIC

        public static final int SPORTS_UNITS_METRIC
        PebbleDictionary value corresponding to 'metric' units.
        See Also:
        Constant Field Values
      • SPORTS_DATA_SPEED

        public static final int SPORTS_DATA_SPEED
        PebbleDictionary value corresponding to 'speed' data.
        See Also:
        Constant Field Values
      • SPORTS_DATA_PACE

        public static final int SPORTS_DATA_PACE
        PebbleDictionary value corresponding to 'pace' data.
        See Also:
        Constant Field Values
      • SPORTS_STATE_INIT

        public static final int SPORTS_STATE_INIT
        The Constant SPORTS_STATE_INIT.
        See Also:
        Constant Field Values
      • SPORTS_STATE_RUNNING

        public static final int SPORTS_STATE_RUNNING
        The Constant SPORTS_STATE_RUNNING.
        See Also:
        Constant Field Values
      • SPORTS_STATE_PAUSED

        public static final int SPORTS_STATE_PAUSED
        The Constant SPORTS_STATE_PAUSED.
        See Also:
        Constant Field Values
      • SPORTS_STATE_END

        public static final int SPORTS_STATE_END
        The Constant SPORTS_STATE_END.
        See Also:
        Constant Field Values
      • GOLF_FRONT_KEY

        public static final int GOLF_FRONT_KEY
        The Constant GOLF_FRONT_KEY.
        See Also:
        Constant Field Values
      • GOLF_MID_KEY

        public static final int GOLF_MID_KEY
        The Constant GOLF_MID_KEY.
        See Also:
        Constant Field Values
      • GOLF_BACK_KEY

        public static final int GOLF_BACK_KEY
        The Constant GOLF_BACK_KEY.
        See Also:
        Constant Field Values
      • GOLF_HOLE_KEY

        public static final int GOLF_HOLE_KEY
        The Constant GOLF_HOLE_KEY.
        See Also:
        Constant Field Values
      • GOLF_PAR_KEY

        public static final int GOLF_PAR_KEY
        The Constant GOLF_PAR_KEY.
        See Also:
        Constant Field Values
      • GOLF_CMD_KEY

        public static final int GOLF_CMD_KEY
        The Constant GOLF_CMD_KEY.
        See Also:
        Constant Field Values
      • GOLF_CMD_PREV

        public static final int GOLF_CMD_PREV
        Command sent by the golf-application to display the next hole.
        See Also:
        Constant Field Values
      • GOLF_CMD_NEXT

        public static final int GOLF_CMD_NEXT
        Command sent by the golf-application to display the previous hole.
        See Also:
        Constant Field Values
      • KIT_STATE_COLUMN_CONNECTED

        public static final int KIT_STATE_COLUMN_CONNECTED
        See Also:
        Constant Field Values
      • KIT_STATE_COLUMN_APPMSG_SUPPORT

        public static final int KIT_STATE_COLUMN_APPMSG_SUPPORT
        See Also:
        Constant Field Values
      • KIT_STATE_COLUMN_DATALOGGING_SUPPORT

        public static final int KIT_STATE_COLUMN_DATALOGGING_SUPPORT
        See Also:
        Constant Field Values
      • KIT_STATE_COLUMN_VERSION_MAJOR

        public static final int KIT_STATE_COLUMN_VERSION_MAJOR
        See Also:
        Constant Field Values
      • KIT_STATE_COLUMN_VERSION_MINOR

        public static final int KIT_STATE_COLUMN_VERSION_MINOR
        See Also:
        Constant Field Values
      • KIT_STATE_COLUMN_VERSION_POINT

        public static final int KIT_STATE_COLUMN_VERSION_POINT
        See Also:
        Constant Field Values
      • KIT_STATE_COLUMN_VERSION_TAG

        public static final int KIT_STATE_COLUMN_VERSION_TAG
        See Also:
        Constant Field Values