+ All Categories
Home > Technology > Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Date post: 02-Jul-2015
Category:
Upload: pebble-technology
View: 270 times
Download: 0 times
Share this document with a friend
Description:
Thomas Sarlandie, Head Developer Evangelist at Pebble, welcomes everyone to the second ever Developer Retreat and goes through a detailed agenda of the next 4 days including some interesting facts about Pebble development over the past year. Also featured: New stuff in 2.6 - Background Workers Coming up in 2.7 - Wakeup API Day 1 - Video 2
59
Transcript
Page 1: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014
Page 2: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

TITLE TEXT

PEBBLE DEVELOPER RETREAT 2014 KICK-OFF

THOMAS - DEVELOPER EVANGELIST @SARFATA

Page 3: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

WELCOME!

Page 4: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

100DEVELOPERS

COUNTRIES 14

Page 5: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

4000+ APPS

Page 6: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

6 MILLION APP DOWNLOADS

Page 7: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

!

!

100+ MILLION HOURS

Page 8: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

MOST USERS ENGAGE WITH 3 OR MORE APPS PER WEEK

Page 9: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

15% OF USERS HAVE TRIED MORE THAN 20 APPS

Page 10: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

THANK YOU!

Page 11: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

PEBBLE IS NOW AVAILABLE IN !

US,UK,CA,BE,NE,LU,DK,NO,SW

AND THE REST OF THE WORLD!

Page 12: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

WHAT DIFFERENCE A YEAR MAKE …

Page 13: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

ONE YEAR OF FIRMWARE

2.1 2.2 2.3 2.4 2.5 2.6

SepFeb

2.0

May June July

User Improvements

Compass …Doc Improvements PebbleKit Improvements

Emoji

Page 14: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

PEBBLE FIRMWARE 2.6 WAS RELEASED THIS WEEK

Page 15: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

ONE YEAR OF FIRMWARE

2.1 2.2 2.3 2.4 2.5 2.6

SepFeb

2.0

May June July

Battery life

PebbleKit JS Connectivity

+10% Battery Life

+50% Time Connected

Page 16: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

AND MORE …

2.72.1 2.2 2.3 2.4 2.5 2.6

SepFeb

2.0

May June July

WakeUp

Page 17: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

AGENDA

Page 18: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Introducing the new APIs !

Developer Retreat 2014 Activities !

Logistics for this week

AGENDA

Page 19: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

NEW APIS

Page 20: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

FRAMEBUFFER ACCESS

Page 21: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Directly manipulate the frame buffer Overlay the frame buffer with UI elements !

GBitmap* graphics_capture_frame_buffer(GContext* ctx);

FRAME BUFFER API

Details later today in our Graphics talk

Page 22: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

BACKGROUND API

Page 23: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Build Activity Trackers A separate executable in your app Only one Worker running on Pebble !

Limited to 12kB of RAM Limited set of APIs !

Can both exchange messages Background app can launch the foreground app

INTRODUCING THE BACKGROUND WORKER API

Foreground App

Background Worker

PBW

Page 24: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

"## appinfo.json"## resources"## src$   &## bgexample.c"## worker_src$   &## worker.c&## wscript

USING BACKGROUND WORKER

The new Pebble build script will automatically look for worker files in the worker_src folder. !

On CloudPebble, you can select to add a file to the foreground app or background worker. !

Worker must #include <pebble_worker.h>!

You can also use pebble new-project --worker

Page 25: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

The foreground process can launch the background worker !

!

!

Check the return value for errors.

STARTING THE BACKGROUND WORKER

AppWorkerResult result = app_worker_launch();

Page 26: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Starting an activity tracker while another one is running will cause the system to show a confirmation popup !

When the interrupting tracker is stopped, the previous one is automatically restarted

ONE BACKGROUND WORKER AT A TIME

Page 27: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Your application can query the state of its background worker !

bool running = app_worker_is_running();!

And of course stop it !

app_worker_kill();

POLLING FOR YOUR BACKGROUND WORKER

Page 28: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Background worker and foreground app can communicate via a new dedicated channel AppWorkerMessage: bool app_worker_message_subscribe(AppWorkerMessageHandler handler);typedef void (*AppWorkerMessageHandler) (uint16_t type, AppWorkerMessage *data);void app_worker_send_message(uint8_t type, AppWorkerMessage *data);!

This channel can be used to synchronize status information, current stats, user actions, etc. AppWorkerMessage is limited to 3 bytes. Use Persistent Storage to exchange more data.

COMMUNICATING WITH BACKGROUND WORKER

Page 29: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Background worker do not have access to AppMessage and PebbleKit JS. They do have access to Persistent Storage and Data Logging, !

Possible strategies: 1. Continuously transfer data to a mobile app via Data Logging 2. Save data to Persistent Storage, Start the foreground app to push data via AppMessage and JavaScript

COMMUNICATING WITH THE PHONE

Page 30: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Designed and optimized for Activity Trackers !

Only one running at a time !

Compatible with DataLogging or PebbleKit JS (via Persistent Storage)

BACKGROUND WORKERS

Page 31: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

WAKE UP API

Coming Soon!

Page 32: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Background Worker is great for activity tracker … But what about Timers, Alarms, Game Alerts? !

The Wake Up API lets your app request a Wake Up call.

WAKE UP!

Page 33: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Your application can set a time in the future where it wants to be awoken: !

WakeupID app_wakeup_schedule(time_t timestamp, int32_t reason, bool notify);

HOW TO REQUEST A WAKE UP CALL?

Page 34: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

If your application is not running, it will be started. You can figure out why via a new AppLaunchReason API: !

AppLaunchReason app_launch_reason(void);!

typedef enum { APP_LAUNCH_SYSTEM = 0, //!< App launched by the system APP_LAUNCH_USER, //!< App launched by user selection APP_LAUNCH_PHONE, //!< App launched by mobile or companion app APP_LAUNCH_WAKEUP //!< App launched by wakeup event} AppLaunchReason;!

bool app_wakeup_get_launch_event(WakeupID *id, int32_t *reason);

HOW TO RECEIVE A WAKE UP CALL

Page 35: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

If your application is running, you will receive an event. Just like all event services, you need to register a handler first: !

typedef void (*WakeupHandler)(WakeupID wakeup_id, int32_t reason);void app_wakeup_service_subscribe(WakeupHandler handler);

HOW TO RECEIVE A WAKE UP CALL

Page 36: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

The system will refuse to schedule a WakeUp event with less than 60 seconds margin to other WakeUp events. Use the return value to re-schedule if needed. !

If the watch is off, the WakeUp event will be missed but you can notify the user via the notify parameter. !

Each app can only schedule up to 8 events.

SNOOZE

Page 37: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

The WakeUp API is included in FW 2.7-beta1 distributed today to all developer retreat attendees and to all registered Pebble developers who request access to it.

USING THE WAKE UP API TODAY

Page 38: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

ACTIVITIES

Page 39: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Thursday Friday Saturday Sunday

Kickoff

Graphics

Battery Workshop

Cod

e Re

view

Hacking and Robots

Hacking

Meetup in SF

Strap

Pebble Dev Awards

Size

1010000

Bluetooth LE Workshop

Computer History Museum

Cod

e Re

view

Cod

e Re

viewCloudPebble

Overlay

Pebble™

Page 40: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

ADVANCED PEBBLE PROGRAMMING

1pm to 4pm

Heiko and Matthew will share our most advanced techniques and best tips! !

Size Graphics 1010000

Page 41: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

SAN FRANCISCO MEETUP

Page 42: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Learn what really impacts battery life !

Find out how much battery your application is really using on user wrists !

Discover best practices to save battery

BATTERY WORKSHOP

10:30 to 11:00

Page 43: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

This is what happens when we let our engineers loose !

Martijn will distribute an experimental (!) firmware with support for a BLE API and we will share a bunch of BLE-enabled gadgets. !

The rest is up to you …

BLUETOOTH LOW ENERGY

11:00 to 11:30

Page 44: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Work with one of our engineer to improve your code, reduce the size of your apps, battery usage, speed of your graphics, etc!

CODE REVIEWS

Page 45: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Discover CloudPebble new features !

Tell us what you would like to see in CloudPebble

CLOUDPEBBLE WORKSHOP

14:30 to 15:00

Page 46: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

STRAP PRESENTATION

15:00 to 15:30

Page 47: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Have you ever struggled with the 24k limit? !

Ron and Grégoire will show you how to split your code in several pieces that will be dynamically loaded from the resources. !

This is also a great presentation to learn more about Pebble memory system and the SDK build tools.

USING RESOURCE SPACE FOR CODE

15:30 to 16:00

Page 48: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

The name Pebble is becoming more and more popular, especially among apps. As we keep on growing we will need to change the rules regarding how you can use our name. !

Join the developer evangelism team and the legal team to discuss how we should roll this out.

USE OF THE “PEBBLE” BRAND

16:00 to 16:30

Page 49: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

COMPUTER HISTORY MUSEUM

Page 50: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

PEBBLE BOTS

Credit: https://www.youtube.com/watch?v=2ibwZYR2oKg

Page 51: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

On Sunday morning, Cherie will give awards to notable members of the developer community.

PEBBLE AWARDS

Page 52: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

Thursday Friday Saturday Sunday

Kickoff

Graphics

Battery Workshop

Cod

e Re

view

Hacking and Robots

Hacking

Meetup in SF

Strap

Pebble Dev Awards

Size

1010000

Bluetooth LE Workshop

Computer History Museum

Cod

e Re

view

Cod

e Re

viewCloudPebble

Overlay

Pebble™

Page 53: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

LOGISTICS

Page 54: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014
Page 55: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

We would like to hear all your feedbacks. There are no subjects that are taboo. Please share all ideas and suggestions.

FEEDBACK THIS YEAR

Appstore APIs flexibilityPaid apps

Phone2Watch Communication

PebbleKit JS

Mobile apps

Pebble.js

8 Apps limit?UI / Design

Firmware APIsConfig view

Answering Notifications?

iOS Android

Promotion

HardwareAccessoriesBands

Customization

Communication

Page 56: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

LOOKING FOR A JOB?

Page 57: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

DEVELOPER RETREAT EXCLUSIVE CONTENT

Page 58: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

ENJOY!

Page 59: Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014

1pm to 4pm

Heiko and Matt

ADVANCED PEBBLE PROGRAMMING


Recommended