Post on 27-Jul-2015
Drive Salesforce User Productivity with the Pebble SmartWatchRichard Tuttle
Oklahoma City Developer User Group Leader
@_drako
Jayvin Arora
Philadelphia Salesforce User Group Leader
@JayvinArora
Richard TuttleOklahoma City Developer User Group Leader
Sr. Technical Architect
Seagate Technology
Jayvin AroraPhiladelphia Salesforce User Group Leader
Applications Development Manager
Agenda
• Introduction to Smart Watches and Pebble
• Pebble Design Patterns
• Integrating Pebble with Salesforce
Introduction to Smart Watches, and Pebble
Technological Trends• From Gartner’s Top 10 Strategic Technology Trends for 2014
The Internet of Things The Personal Cloud Hybrid IT and Cloud Computing
Companies have access to wearable techhology
to connect their users to their company and personal clouds securely.
Smart Watches• Pros
– Extends mobile apps beyond the pocket – Key use cases is “glance-able" information and light weight interactions.
• i.e. push notifications – Lets people stay informed with discreet alerts/notifications, without having to look at phone.– Can incorporate extensive functionality in the physical space where people just wear a
watch/used to wear a watch– User Adoption is expected to grow to 130 Million users by 2018
Smart Watches• Cons
– Limited System Resources: • Limited battery life- limits the frequency of display updates.
– Difficult to have a meaningful UX• Small screen space• Limited UI functionality depending on the watch
– People see the devices as a gimmick.– Narrow use cases, especially in a mobile society
??
Pebble Smartwatch• Product Overview
– Released Q3 of 2013 via a kick starter (Compared with Apple Smartwatch 2015)– Black and white e-paper display, ambient light sensors, vibrating motor, magnetometer and an
accelerometer.– Compatible with Android and iOS devices– 1 bit Graphical Display ( Black, White, and Dithered graphics)– 3 Button Input
Pebble Smartwatch – Technical ConsiderationsPlatforms
?
• iOS – SDK, and native Pebble app with PebbleKit-JS
• Android – SDK, and native Pebble app with PebbleKit-JS
• Windows Phone 8 – Nothing native at this point, some custom apps derived from an open source project called Flintlock and libpebble
• Blackberry – Haha, just kidding
Pebble Smartwatch• Technical Considerations
– Tethered to your smart phone– Communicates with phones via Bluetooth Low Energy ( BLE)– Supports two-way communication between pebbles and smartphones running iOS or Android via
the AppMessage framework.– Open Pebble SDK– Battery life 5- 7 days– Pebble provides code and background to get you started quickly.
Pebble Design Patterns
Components of a Pebble ApplicationThe window stack
• Used to allow multiple layers of windows throughout the entire Pebble UI
• WatchApps can have multiple windows used for different purposes
• Control the flow of the application by pushing different windows into/from the stack
• Can be used to separate functional areas of your code
Pebble Applications 2 types of Applications in Pebble
• WatchApp– Has to be accessed from the menu– Doesn’t retain the main window space permanently– Can be triggered to open from events sent by the
phone– Access to all 3 right side buttons, accelerometer,
and magnetometer
• Watchface– WatchApp that is designed to show the time
constantly– Limited input options, no buttons, only
magnetometer and accelerometer
Components of a Watch App• Pebble Watch App (Watch)
– This is the app on the watch. It handles the User Experience - Displays output and gathers input– Written in C
• Smartphone running the Pebble App (Smartphone)– This is the App on the phone that makes calls to the Webservice and handles the data that is
received. – Where the OAuth connection is managed.– Written in JavaScript
Watch App design basics• Written in C
• Recommended App Structure- a standard C main() function and two functions to help us organize the creation and destruction of all the Pebble SDK elements.
• Windows are composed of layers that represent components of the UI– Layers are objects that can be displayed as visual objects, like text or images. – Layers store information about its state necessary to draw or redraw
Components of a Pebble ApplicationAppMessage and AppSync
• AppMessage– Bi-directional messaging from phone to watch– Uses a push messaging system and a handler– Limited in size of messages– Available for use in PebbleKit-JS and native SDKs
• AppSync– Built on top of the AppMessage – Maintains a synced dictionary between phone and
WatchApp– Callback routine available to notify app when
dictionary is changed
PebbleKit-JS and Native SDKGetting data to and from the watch
• PebbleKit-JS – Javascript capability built into Pebble native app that allows your application to communicate with the internet
• Native SDK – Library to use in your mobile applications to extend Pebble functionality
Watch App design basics• Written in JavaScript
• Allows you to connect to a webservice• Allows user to open a configuration screen on the phone• Where oAuth and custom variables are stored that don’t fit into the watch UI
Integrating Pebble with Salesforce
Design Patterns• 4 Components in the Smartwatch App design
– Pebble Watch App (Watch)• This is the app on the watch. It handles the User Experience - Displays output and gathers input• Written in C
– Smartphone running the Pebble App (Smartphone)• This is the App on the phone that makes calls to Salesforce and handles the data that is received from
Salesforce. This is also where the OAuth connection to Salesforce is managed.• Written in JavaScript
– Salesforce1 Platform• Handles the connection from the connected devices to the data in Salesforce,• In our example the interface is written in JavaScript, the REST APIs are used
– Salesforce App• The Standard web or mobile UI used to update records.
Design Patterns
• https://github.com/developerforce/WearablePack-Pebble/blob/master/samples/SF1PebbleDashboard/README.md
PebbleForce - Increase Productivity• The Application – PebbleForce• Demo Time
Getting Started/Resources• Pebble
– (Guides, references, forums, etc.)– cloudpebble.net – An online IDE for pebble development
• write, compile and install straight to your Pebble.– #pebble in IRC– Prerequisites – Familiarity with OAuth, C and JavaScript
• C concepts – Buffers, Pointers, Memory Management, etc– You’re a long way from the Cloud.
References
– http://www.juniperresearch.com/viewpressrelease.php?pr=414– http://readwrite.com/2014/02/10/10-cool-things-a-pebble-smartwatch-can-do– https://github.com/Hexxeh/libpebble– https://github.com/barometz/flintlock– https://developer.getpebble.com/2/guides/ – @KatharineBerry – SF Developer Pack– https://developer.getpebble.com/