The APIs on this page will only work with SDK 4.9+.
Subscribe to touch events. The touch sensor is enabled while subscribed.
Callback invoked for each touch event
User context passed to the callback
Unsubscribe from touch events. The touch sensor is disabled if no other subscribers remain.
true if touch input is currently being delivered to apps. Returns false on platforms without a touchscreen, or when touch has been disabled system-wide (future feature). Apps can poll this (for example on window appear) to avoid looking broken when touch is unavailable.
Opt this app into (or out of) touch navigation: the system gesture bridge that maps swipes/taps on a MenuLayer/ScrollLayer to button presses. Third-party apps are opt-out by default and receive no touch navigation even when the user has enabled it system-wide; call this with enable true to participate. Takes effect immediately when touch navigation is enabled system-wide, otherwise once the user enables it.
true to participate in touch navigation, false to stop participating.
Touch event data, carried directly in PebbleTouchEvent.
true when the touch must not drive navigation: the interaction session was inactive at Touchdown (unarmed contact on the idle watchface). Latched on Touchdown and carried across the whole gesture.
Touch event type.
Callback for touch events.
The touch event data
User-provided context
Do you have questions about the Pebble SDK?
Do you need some help understanding something on this page?
You can either take advantage of our awesome developer community and check out the SDK Help forums, or you can join us on the Discord!