#pdr15 - best use cases for timeline
TRANSCRIPT
![Page 1: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/1.jpg)
2015 Pebble Developer Retreat
Best Use Cases for Timeline
Jon Barlow, Developer Advocate
![Page 2: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/2.jpg)
Quick Overview
•Timeline Primer •All About Pins •Best Use Cases •Benefits & Pitfalls •Questions?
![Page 3: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/3.jpg)
Timeline Primer
![Page 4: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/4.jpg)
What is Timeline
•Core UI feature of 3.x •Chronological information (pins) •Past, present & future •Pin summary & detailed views •Notifications, reminders & actions
![Page 5: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/5.jpg)
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)
![Page 6: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/6.jpg)
How Does Timeline Work
•Cloud service •Publish via simple REST API •Phone syncs to Pebble •Pins are cached on the Pebble
![Page 7: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/7.jpg)
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
![Page 8: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/8.jpg)
All About Pins
![Page 9: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/9.jpg)
All About Pins
Types of pins •Shared pins (topics)
• Individual user pins
![Page 10: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/10.jpg)
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":[]}
![Page 11: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/11.jpg)
All About Pins
Pin layouts •Calendar layout •Weather layout •Sports layout •Generic layout
![Page 12: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/12.jpg)
All About Pins
Notifications & Reminders •Notify when pin added or updated •Reminder appears before an event occurs
![Page 13: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/13.jpg)
All About Pins
Actions •openWatchApp action •Launch codes
![Page 14: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/14.jpg)
All About Pins
All New… •HTTP actions!
![Page 15: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/15.jpg)
All About Pins
![Page 16: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/16.jpg)
Best Use Cases(that we’ve seen so far)
![Page 17: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/17.jpg)
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();}
![Page 18: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/18.jpg)
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™
![Page 19: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/19.jpg)
Best Use Cases
Developer Retreat Schedule •Watchface •Schedule from Google sheet •Pins with reminders • I made this™
![Page 20: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/20.jpg)
Best Use Cases
8-A-Day •Recurring reminders with tracking •Pins •Actions •yes=increment •no=remind
•Notifications
![Page 21: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/21.jpg)
Best Use Cases
Travel (formerly Flights) •Powered by TripIt API •Flight tracking in your timeline •Departure reminders •Change notifications •Live updates •Weather •Accommodation & rentals
![Page 22: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/22.jpg)
Best Use Cases
ESPN • In-app shared topic subscriptions •Past & future sports games •Live scores with notifications •Actions open game context •Many teams & sports
![Page 23: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/23.jpg)
Best Use Cases
Watchie-Talkie •User to user messaging •Messages delivered by timeline
![Page 24: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/24.jpg)
Additional Use Cases
Healthcare, fitness & medication Transportation Events, schedules, reminders Todo lists Gaming … many possibilities
![Page 25: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/25.jpg)
One Size Does Not Fit AllNot all apps need timeline support
![Page 26: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/26.jpg)
Benefits & Pitfalls
![Page 27: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/27.jpg)
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
![Page 28: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/28.jpg)
Coming Soon™
![Page 29: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/29.jpg)
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
![Page 30: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/30.jpg)
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/
![Page 31: #PDR15 - Best Use Cases For Timeline](https://reader034.vdocuments.site/reader034/viewer/2022042611/58ed20c31a28ab43498b463d/html5/thumbnails/31.jpg)
Questions?