#pdr15 - best use cases for timeline
TRANSCRIPT
2015 Pebble Developer Retreat
Best Use Cases for Timeline
Jon Barlow, Developer Advocate
Quick Overview
•Timeline Primer •All About Pins •Best Use Cases •Benefits & Pitfalls •Questions?
Timeline Primer
What is Timeline
•Core UI feature of 3.x •Chronological information (pins) •Past, present & future •Pin summary & detailed views •Notifications, reminders & actions
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)
How Does Timeline Work
•Cloud service •Publish via simple REST API •Phone syncs to Pebble •Pins are cached on the Pebble
How Does Timeline Really WorkYou 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
All About Pins
All About Pins
Types of pins •Shared pins (topics)
• Individual user pins
All About Pins
Pin characteristics •Date & time •Duration (minutes) •Layout (appearance) •Notifications* •Reminders* •Actions* *=optional
{"id":"my-unique-id","time":"2015-10-09T15:00:00Z","duration":60,"layout":{},"createNotification":{},"updateNotification":{},"reminders":[],"actions":[]}
All About Pins
Pin layouts •Calendar layout •Weather layout •Sports layout •Generic layout
All About Pins
Notifications & Reminders •Notify when pin added or updated •Reminder appears before an event occurs
All About Pins
Actions •openWatchApp action •Launch codes
All About Pins
All New… •HTTP actions!
All About Pins
Best Use Cases(that we’ve seen so far)
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>
intmain(void){psleep(4*1000);app_event_loop();}
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™
Best Use Cases
Developer Retreat Schedule •Watchface •Schedule from Google sheet •Pins with reminders • I made this™
Best Use Cases
8-A-Day •Recurring reminders with tracking •Pins •Actions •yes=increment •no=remind
•Notifications
Best Use Cases
Travel (formerly Flights) •Powered by TripIt API •Flight tracking in your timeline •Departure reminders •Change notifications •Live updates •Weather •Accommodation & rentals
Best Use Cases
ESPN • In-app shared topic subscriptions •Past & future sports games •Live scores with notifications •Actions open game context •Many teams & sports
Best Use Cases
Watchie-Talkie •User to user messaging •Messages delivered by timeline
Additional Use Cases
Healthcare, fitness & medication Transportation Events, schedules, reminders Todo lists Gaming … many possibilities
One Size Does Not Fit AllNot all apps need timeline support
Benefits & Pitfalls
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
Coming Soon™
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
Find Out More
• Timeline Guideshttp://developer.getpebble.com/guides/timeline/
• Timeline Blog Postshttps://developer.getpebble.com/blog/tags/timeline/
• Timeline Overview Videohttps://www.youtube.com/watch?v=XYZoWS0QxI8
• Timeline Librarieshttp://developer.getpebble.com/guides/timeline/timeline-libraries/
Questions?