Learn all about timeline on Pebble. Specifically when to use it and when not to use it. See some of the best use cases for timeline and find out why timeline gives your app a competitive advantage with Jon Barlow (Developer Advocate).
4. What is Timeline
• Core UI feature of 3.x
• Chronological information (pins)
• Past, present & future
• Pin summary & detailed views
• Notifications, reminders & actions
5. Why Was Timeline Created
• Born from analysis of interaction
• Time is natural for a watch
• Instantly accessible information
• Avoids silos of information
• Expose rich native functionality
• Consistent UI/UX
• Form factor (rect/round)
6. How Does Timeline Work
• Cloud service
• Publish via simple REST API
• Phone syncs to Pebble
• Pins are cached on the Pebble
7. How Does Timeline Really Work
You send your timeline JSON to the Magical Pebble Cloud. The Magical Pebble Cloud then
stores it in a Mongo database and also kicks a push notification service. The push notification
service sends a silent notification to your phone telling it to perform a timeline sync. Since this
can fail, the watch also tells the phone to check every fifteen minutes, which it does. The
timeline sync service is an incremental service: the phone indicates where in the timeline
stream it is, and the sync service provides it with everything that’s changed since. The sync
service can also force a resync, and the phone can not provide the position token, in which
case it’s a full sync. The pins received from the timeline sync service are reconciled with the
timeline database stored on the phone, and what is effectively a diff is constructed. Whatever is
changed is then serialised into a binary timeline item format, and sent to the watch to store in
the relevant blobdb. These are cleaned out by the watch when they get too old, and also
cleaned out by the phone if it thinks it’s lost track of the watch’s state (e.g. because you paired
it with another phone).
katharine
17. Best Use Cases
Fortune
• Random daily fortunes
• fortune_timeline.py (21 lines of code)
• pebble-js-app.js (9 lines of code)
• fortune_timeline.c (5 lines of code) #include <pebble.h>
int main(void) {
psleep(4 * 1000);
app_event_loop();
}
18. Best Use Cases
The Day Today
• Famous deaths & births
• Motivational quotes
• Daily Facts
• Horoscopes and much more
• Data scraped from multiple sources
• Pushed as pins daily using cron jobs
• I made this™
19. Best Use Cases
Developer Retreat Schedule
• Watchface
• Schedule from Google sheet
• Pins with reminders
• I made this™
20. Best Use Cases
8-A-Day
• Recurring reminders with tracking
• Pins
• Actions
•yes=increment
•no=remind
• Notifications
21. Best Use Cases
Travel (formerly Flights)
• Powered by TripIt API
• Flight tracking in your timeline
• Departure reminders
• Change notifications
• Live updates
• Weather
• Accommodation & rentals
22. Best Use Cases
ESPN
• In-app shared topic subscriptions
• Past & future sports games
• Live scores with notifications
• Actions open game context
• Many teams & sports
27. Benefits of Timeline
• Super easy
• Consistent UI/UX
• Your app doesn’t need to be running
• Pin and forget
• Approximately three-quarters of 3.x users launch timeline
weekly
• Only 4% of apps currently put pins on the timeline
• Works with watchapps and watchfaces
29. Common Pitfalls
• User pins are per app+Pebble account, not app+device
• Blackhole - keep track of your pin IDs
• Shared pins - check timezones
• Sync delays, can be up to 15 mins
• Avoid spamming
•Limited memory
•Limited battery
30. Find Out More
• Timeline Guides
http://developer.getpebble.com/guides/timeline/
• Timeline Blog Posts
https://developer.getpebble.com/blog/tags/timeline/
• Timeline Overview Video
https://www.youtube.com/watch?v=XYZoWS0QxI8
• Timeline Libraries
http://developer.getpebble.com/guides/timeline/timeline-
libraries/