firefox os webapis - brief
DESCRIPTION
Brief introduction to Firefox OS WebAPIsTRANSCRIPT
![Page 1: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/1.jpg)
Introduction to
Web APIs
![Page 2: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/2.jpg)
APIApplication Programming Interface
![Page 3: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/3.jpg)
XMLHttpRequest
Used to send and receive information using HTTP, including for downloading files,
without refreshing, moving away.
![Page 4: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/4.jpg)
Vibration API
![Page 5: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/5.jpg)
Screen Orientation
![Page 6: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/6.jpg)
Device Orientation
23° Left
![Page 7: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/7.jpg)
Device Storage API
![Page 8: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/8.jpg)
TCP Socket API
![Page 9: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/9.jpg)
Geolocation
Enables your app to request the user's current location and listen for location
changes.
![Page 10: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/10.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/11.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/12.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/13.jpg)
WebActivityIt’s important
![Page 14: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/14.jpg)
• Make a call
• Send an SMS
• Select an image for upload / take a picture
• Share stuff…
![Page 15: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/15.jpg)
Make a call
var call = new MozActivity();
![Page 16: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/16.jpg)
Make a call
var call = new MozActivity({});
![Page 17: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/17.jpg)
Make a call
var call = new MozActivity({ name: "dial", data: {}});
![Page 18: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/18.jpg)
Make a call
var call = new MozActivity({ name: "dial", data: { number: "01675554969" }});
![Page 19: Firefox OS WebAPIs - Brief](https://reader035.vdocuments.mx/reader035/viewer/2022062418/556622bcd8b42a61238b4c86/html5/thumbnails/19.jpg)
Resources
• http://developer.mozilla.org• http://hacks.mozilla.org• http://html5rocks.com