APIs to handle event services.
Pebble OS provides you with a set of APIs for handling event services, like accelerometer taps, app focus for interactivity, battery states, Bluetooth connections, and tick timers to call when a time component has changed. You use event services to be notified, for example, when something happens on Pebble, like losing the connection to the phone or when a notification covers the screen and requires your Pebble game to pause.
Using the Pebble accelerometer.
Handling app focus The AppFocusService allows developers to be notified when their apps become visible on the screen. Common reasons your app may be running but not be on screen are: it's still in the middle of launching and being revealed by a system animation, or it is being covered by a system window such as a notification. This service is useful for apps that require a high degree of user interactivity, like a game where you'll want to pause when a notification covers your app window. It can be also used for apps that want to sync up an intro animation to the end of the system animation that occurs before your app is visible.
Determines when the battery state changes.
The Compass Service combines information from Pebble's accelerometer and magnetometer to automatically calibrate the compass and transform the raw magnetic field information into a CompassHeading, that is an angle to north. It also provides magnetic north and information about its status and accuracy through the CompassHeadingData structure. The API is designed to also provide true north in a future release.
Determine what the Pebble watch is connected to.
Get access to health information like step count, sleep totals, etc.
Handling time components.