Firefox OS WebAPIs - Brief

19
Introduction to Web APIs

description

Brief introduction to Firefox OS WebAPIs

Transcript of Firefox OS WebAPIs - Brief

Page 1: Firefox OS WebAPIs - Brief

Introduction to

Web APIs

Page 2: Firefox OS WebAPIs - Brief

APIApplication Programming Interface

Page 3: Firefox OS WebAPIs - Brief

XMLHttpRequest

Used to send and receive information using HTTP, including for downloading files,

without refreshing, moving away.

Page 4: Firefox OS WebAPIs - Brief

Vibration API

Page 5: Firefox OS WebAPIs - Brief

Screen Orientation

Page 6: Firefox OS WebAPIs - Brief

Device Orientation

23° Left

Page 7: Firefox OS WebAPIs - Brief

Device Storage API

Page 8: Firefox OS WebAPIs - Brief

TCP Socket API

Page 9: Firefox OS WebAPIs - Brief

Geolocation

Enables your app to request the user's current location and listen for location

changes.

Page 10: Firefox OS WebAPIs - Brief

Ambient Light Sensor API

Provides access to the ambient light sensor, which lets your app detect the ambient light level in the vicinity of the

device.

Page 11: Firefox OS WebAPIs - Brief

Battery Status API

Provides information about the battery's charge level and whether or not the device

is currently plugged in and charging.

Page 12: Firefox OS WebAPIs - Brief

Pointer Lock API

Lets apps lock access to the mouse and gain access to movement deltas rather than

absolute coordinates; this is great for gaming.

Page 13: Firefox OS WebAPIs - Brief

WebActivityIt’s important

Page 14: Firefox OS WebAPIs - Brief

• Make a call

• Send an SMS

• Select an image for upload / take a picture

• Share stuff…

Page 15: Firefox OS WebAPIs - Brief

Make a call

var call = new MozActivity();

Page 16: Firefox OS WebAPIs - Brief

Make a call

var call = new MozActivity({});

Page 17: Firefox OS WebAPIs - Brief

Make a call

var call = new MozActivity({ name: "dial", data: {}});

Page 18: Firefox OS WebAPIs - Brief

Make a call

var call = new MozActivity({ name: "dial", data: { number: "01675554969" }});

Page 19: Firefox OS WebAPIs - Brief

Resources

• http://developer.mozilla.org• http://hacks.mozilla.org• http://html5rocks.com