Monday, June 22, 2015

Understanding the Pebble Watch Timeline

Earlier this year, Pebble announced the Pebble Time, their third generation smartwatch, funded via their hugely successful Kickstarter campaign. The Pebble Time ships with a new feature called Timeline for displaying information to the user (such as notifications, news, reminders and events) in chronological order on a timeline. Previously, Pebble required developers to write native apps for displaying information on the Pebble. Now, developers can push information onto the timeline directly using JSON from their own private server, via a public REST API.

If you’re unfamiliar with the Pebble Time, I encourage you to check out this article by Patrick Catanzariti by way of a refresher.

What Is the Timeline?

Smartphone notifications are instant and represent a transaction that occurs at that very moment in time. By definition they can’t arrive earlier or later.

The Pebble Time ships with a new OS feature called timeline. Timeline brings another dimension to your notifications; the dimension of time. The timeline shouldn’t be confused with a notification history. Timeline allows third parties to send past notifications and future notifications to you; notifications that you don’t need to know immediately, but may want to look up some time later. For example, you may want to look up what time you left your house in the morning, or what time sunrise was, or what percentage points the stock market opened at earlier, or when the next train out of Kennedy Town is.

Animated gif showing Pebble timeline in action

Credit: pebble

The beauty of the timeline is that you can dump virtually any information into it, no matter how insignificant, because the information doesn’t interrupt the user. For example, an egg timer app which buzzes the user when the timer goes off can also push the event onto the timeline. You can never tell when a user is going to ask him or herself, “when did I set that timer for that cake I baked this morning?”.

Of course, the timeline can also hold important timely information, such as a train schedule or movie times at your local cinema. Rather than being notified five minutes in advance of when a train departs, users can look ahead on their watch for the next train and the train after that. All this information is pushed silently to your watch and condensed into a single scrollable interface.

Other than being an outlet for random bits of information relevant to your life, Pebble automatically fills your timeline with past and future events from your smartphone’s calendar, so that you get a holistic view of your day.

Graphic depicting the timeline buttons

Credit: pebble

How Does It Work?

Pebble calls timeline notifications “pins”. Pins are universally managed on Pebble’s server and Pebble devices are set to periodically connect and download a fresh list of pins to display on the timeline. Pebble’s server ensures that users are not spammed with too many pins and allow developers to push pins to multiple users with one command.

All pins must go through Pebble’s server. Even local apps which want to display a pin on the local device must first push the pin to the server and allow the device to receive it in its regular update schedule (15 minutes).

The issuer of the pin can update and delete the pin and Pebble’s server will push the changes to the Pebble device.

Anatomy of a Pin

All pins are written in JSON format and are pushed to Pebble’s server over HTTPS.

An example of a minimal pin looks like this:

[code language="js"]
{
"id": "xxxxxxxxx",
"time": "2015-05-25T08:42:00Z",
"layout": {
"type": "genericPin",
"title": "You left your house",
"tinyIcon": "system://images/NOTIFICATION_FLAG"
}
}
[/code]

  1. The id is a random unique string for each event and allows the issuer to update and delete the pin.
  2. The time determines where in the timeline it should appear.
  3. The layout contains the information that will be shown on the screen.
  4. The type defines whether the pin should be formatted as a generic, calendar, sports, weather, etc. event.
  5. The title is the text shown on the screen.
  6. The tinyIcon is from a list of permitted icons.

Continue reading %Understanding the Pebble Watch Timeline%


by Dmitri Lau via SitePoint

No comments:

Post a Comment