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

PebbleKit JS

  • Pebble C API
  • Pebble JavaScript API
  • PebbleKit JS
  • PebbleKit iOS
  • PebbleKit Android
  • Pebble
    • addEventListener
    • on
    • removeEventListener
    • off
    • showSimpleNotificationOnPebble
    • sendAppMessage
    • postMessage
    • getTimelineToken
    • timelineSubscribe
    • timelineUnsubscribe
    • timelineSubscriptions
    • getActiveWatchInfo
    • getAccountToken
    • getWatchToken
    • appGlanceReload
    • TimelineTopicsCallback
    • openURL
    • AppGlanceReloadFailureCallback
    • AppMessageAckCallback
    • AppMessageNackCallback
    • EventCallback
    • TimelineTokenCallback
    • AppGlanceReloadSuccessCallback
    • PostMessageCallback
    • PostMessageErrorCallback
    • PostMessageConnectedCallback
    • PostMessageDisconnectedCallback
    • WatchInfo
    • AppGlanceSlice

PebbleKit JavaScript Documentation

PebbleKit JS is a JavaScript component of the Pebble SDK which runs within the Pebble mobile application. It provides access to GPS, storage and Internet connectivity to applications running on Pebble smartwatches.

This does not relate to JavaScript running on the watch. For embedded JavaScript see Rocky.js.

The PebbleKit JS API is provided via the `Pebble` namespace:


Pebble


PebbleKit JS also provides access to the following standard JS functionality:

  • WebSockets
  • XMLHttpRequest
  • Geolocation
  • LocalStorage

To learn more about how to use this part of the Pebble SDK, check out the PebbleKit JS guide, which also includes links to example apps.

You can also view the third part of the Create a C Watchface tutorial series for an example JS implementation.