developing pebble smartwatch apps

Post on 22-Jan-2018

243 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Data on your wristDEVELOPING PEBBLE SMARTWATCH APPS

Michael EarlsAdvanced Systems Design

http://cerkit.com

me@cerkit.com

Getting started

with ASP.NET

WebAPI

DEVELOPMENT

ENVIRONMENT, HOSTING,

AND DEMO APP

What is WebAPI?

ASP.NET Web API is a framework that makes it easy to

build HTTP services that reach a broad range of clients,

including browsers and mobile devices.

ASP.NET Web API is an ideal platform for building RESTful

applications on the .NET Framework.

REST – REpresentational State Transfer – HTTP GET, POST,

PUT, DELETE

WebAPI – IDE and Hosting

Visual Studio 2013-2015

Community Edition (Free)

Professional Edition (Paid)

Visual Studio Code

Mac, Linux, and Windows

Hosting

Any host that supports ASP.NET 4.5.x

Windows Azure is easy to set up

Creating a WebAPI Project

Standard Web Project

Add WebAPI

Add MVC if you wish to build a web

front-end to your API

WebAPI Project Creation

DEMO

Getting started

with Pebble app

development

DEVELOPMENT

ENVIRONMENT, LANGUAGE

SUPPORT, AND SAMPLE

CODE

Development Environment – Pebble not required

Pebble C SDK

Apple OSX – Xcode or other IDE

Linux – editor/IDE of choice

No Windows Support

Cryptic compiler error/warning messages

Standalone Emulator

Allows you to link outside libraries

App configuration in .json file

CloudPebble(http://cloudpebble.net)

Online IDE

Chrome browser on any platform

C, Pebble.js languages

Good, easy to understand compiler errors/warnings

Browser-based emulator

No outside libraries supported

Easy app configuration

Language Support

JavaScript (Pebble.js)

Runs on phone

Requires active Bluetooth connection to Pebble App on phone

Supports:

WebSockets

XMLHttpRequest

Geolocation

LocalStorage

C

Runs on watch

Does not require connection to phone unless JavaScript is also used

CloudPebble Demo

Developing an app in CloudPebble

App Settings Page

HTML/JavaScript Page

Hosted on the Internet

Opens in WebViewer from within Pebble

smartphone app

Settings Page

Bootstrap

JavaScript to determine test or production

modes

Code to set configuration settings on the

watch

Settings Page

Demonstration

JavaScript integration with C

Phone functionality (GPS, Internet, Weather, etc.) requires JavaScript

Must pass values between C code and JavaScript code using a dictionary

Steps to pass data:

Setup callbacks in C code

app_message_open() – C code that starts the process of requesting a message

Pebble.sendAppMessage() – Pebble.js code that actually sends the message

Uses a JavaScript object representing a simple dictionary containing the values you wish to send

inbox_received_callback() – C code that processes call as a dictionary of

Tuples containing the data that was passed in

How do I make money with Pebble?

Pebble apps are all free on the

Pebble app store

Companion apps on Google Play or

Apple app store

Links

CloudPebble – http://www.cloudpebble.net

Discogs REST API – http://www.discogs.com/developers/

Settings Page Gist - https://gist.github.com/cerkit/c5e42de6016067d1d585

Getting started with WebAPI - http://goo.gl/FGk6gW

My personal blog – http://cerkit.com

@cerkit on Twitter

top related