Firefox OS WebAPIs - Brief

Post on 28-May-2015

301 views 0 download

Tags:

description

Brief introduction to Firefox OS WebAPIs

Transcript of Firefox OS WebAPIs - Brief

Introduction to

Web APIs

APIApplication Programming Interface

XMLHttpRequest

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

without refreshing, moving away.

Vibration API

Screen Orientation

Device Orientation

23° Left

Device Storage API

TCP Socket API

Geolocation

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

changes.

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.

Battery Status API

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

is currently plugged in and charging.

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.

WebActivityIt’s important

• Make a call

• Send an SMS

• Select an image for upload / take a picture

• Share stuff…

Make a call

var call = new MozActivity();

Make a call

var call = new MozActivity({});

Make a call

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

Make a call

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

Resources

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