SlideShare a Scribd company logo
Mozilla, Firefox OS & the Open Web
Mozilla, Firefox OS and the Open Web
Mozilla, Firefox OS and the Open Web
Mozilla, Firefox OS and the Open Web
Mozilla, Firefox OS and the Open Web
@robertnyman
Mozilla is a
global non-
profit dedicated
to putting you
in control of
your online
experience and
shaping the
future of the
Web for the
public good
Mozilla, Firefox OS and the Open Web
Mozilla, Firefox OS and the Open Web
Mozilla, Firefox OS and the Open Web
Building for mobile
Using HTML5, CSS and
JavaScript together with a
number of APIs to build
apps and customize the UI.
Firefox OS
A walk in the park
Build excellent interfaces!
Packaged vs. Hosted Apps
WebAPIs
Mozilla, Firefox OS and the Open Web
Security Levels
Web Content
Regular web content
Installed Web App
A regular web app
Privileged Web App
More access, more responsibility
Certified Web App
Device-critical applications
https://wiki.mozilla.org/
WebAPI#Planned_for_initial_release_of_B2G_.
28aka_Basecamp.29
"permissions": {
"contacts": {
"description": "Required for autocompletion in the share screen",
"access": "readcreate"
},
"alarms": {
"description": "Required to schedule notifications"
}
}
PERMISSIONS
Vibration API (W3C)
Screen Orientation
Geolocation API
Mouse Lock API (W3C)
Open WebApps
Network Information API (W3C)
Battery Status API (W3C)
Alarm API
Web Activities
Push Notifications API
WebFM API
WebPayment
IndexedDB (W3C)
Ambient light sensor
Proximity sensor
Notification
REGULAR APIS
BATTERY STATUS
API
var battery = navigator.battery;
if (battery) {
var batteryLevel = Math.round(battery.level * 100) + "%",
charging = (battery.charging)? "" : "not ",
chargingTime = parseInt(battery.chargingTime / 60, 10,
dischargingTime = parseInt(battery.dischargingTime / 60, 10);
// Set events
battery.addEventListener("levelchange", setStatus, false);
battery.addEventListener("chargingchange", setStatus, false);
battery.addEventListener("chargingtimechange", setStatus, false);
battery.addEventListener("dischargingtimechange", setStatus, false);
}
SCREEN
ORIENTATION API
// Portrait mode:
screen.mozLockOrientation("portrait");
/*
Possible values:
"landscape"
"portrait"
"landscape-primary"
"landscape-secondary"
"portrait-primary"
"portrait-secondary"
*/
VIBRATION API
// Vibrate for one second
navigator.vibrate(1000);
// Vibration pattern [vibrationTime, pause,…]
navigator.vibrate([200, 100, 200, 100]);
// Vibrate for 5 seconds
navigator.vibrate(5000);
// Turn off vibration
navigator.vibrate(0);
DEVICEPROXIMITY
window.addEventListener("deviceproximity", function (event) {
// Current device proximity, in centimeters
console.log(event.value);
// The maximum sensing distance the sensor is
// able to report, in centimeters
console.log(event.max);
// The minimum sensing distance the sensor is
// able to report, in centimeters
console.log(event.min);
});
AMBIENT LIGHT
EVENTS
window.addEventListener("devicelight", function (event) {
// The level of the ambient light in lux
console.log(event.value);
});
window.addEventListener("devicelight", function (event) {
// The lux values for "dim" typically begin below 50,
// and the values for "bright" begin above 10000
console.log(event.value);
});
Device Storage API
Browser API
TCP Socket API
Contacts API
systemXHR
PRIVILEGED APIS
DEVICE STORAGE
API
var deviceStorage = navigator.getDeviceStorage("videos");
// "external", "shared", or "default".
deviceStorage.type;
// Add a file - returns DOMRequest with file name
deviceStorage.add(blob);
// Same as .add, with provided name
deviceStorage.addNamed(blob, name);
// Returns DOMRequest/non-editable File object
deviceStorage.get(name);
// Returns editable FileHandle object
deviceStorage.getEditable(name);
// Returns DOMRequest with success or failure
deviceStorage.delete(name);
// Enumerates files
deviceStorage.enumerate([directory]);
// Enumerates files as FileHandles
deviceStorage.enumerateEditable([directory]);
var storage = navigator.getDeviceStorage("videos"),
cursor = storage.enumerate();
cursor.onerror = function() {
console.error("Error in DeviceStorage.enumerate()", cursor.error.name);
};
cursor.onsuccess = function() {
if (!cursor.result)
return;
var file = cursor.result;
// If this isn't a video, skip it
if (file.type.substring(0, 6) !== "video/") {
cursor.continue();
return;
}
// If it isn't playable, skip it
var testplayer = document.createElement("video");
if (!testplayer.canPlayType(file.type)) {
cursor.continue();
return;
}
};
WEB ACTIVITIES
Interacting with the camera
Mozilla, Firefox OS and the Open Web
var activity = new MozActivity({
name: "view",
data: {
type: "image/png",
url: ...
}
});
activity.onsuccess = function () {
console.log("Showing the image!");
};
activity.onerror = function () {
console.log("Can't view the image!");
};
{
"activities": {
"share": {
"filters": {
"type": ["image/png", "image/gif"]
}
"href": "sharing.html",
"disposition": "window"
}
}
}
navigator.mozSetMessageHandler("activity", function (a) {
var img = getImageObject();
img.src = a.source.url;
// Call a.postResult() or a.postError() if
// the activity should return a value
});
Future APIs
Resource lock API
UDP Datagram Socket API
Peer to Peer API
WebNFC
WebUSB
HTTP-cache API
Calendar API
Spellcheck API
LogAPI
Keyboard/IME API
WebRTC
FileHandle API
Sync API
Games!
Web Apps from Mozilla
Mozilla, Firefox OS and the Open Web
Dialer
Contacts
Settings
SMS
Web browser
Gallery
Video Player
Music Player
E-mail (POP, IMAP)
Calendar
Alarm Clock
Camera
Notes
First Run Experience
Notifications
Home Screen
Mozilla Marketplace
System Updater
Localization Support
Mozilla, Firefox OS and the Open Web
Get started
https://addons.mozilla.org/firefox/addon/firefox-os-
simulator/
FIREFOX OS
BOILERPLATE APP
https://github.com/robnyman/Firefox-OS-Boilerplate-App
Help each other
Go have some fun!
Robert Nyman
robertnyman.com
robert@mozilla.com
Mozilla
@robertnyman

More Related Content

What's hot (20)

PDF
Python, WebRTC and You
Saúl Ibarra Corretgé
 
PPTX
JavaScript on HP webOS: Enyo and Node.js
Ben Combee
 
PPT
Developing Applications for WebOS
Chuq Von Rospach
 
PDF
Python Flask app deployed to OPenShift using Wercker CI
Bruno Rocha
 
PDF
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
JAX London
 
PPSX
Selenium WebDriver
Rajathi-QA
 
PDF
Joe Staner Zend Con 2008
ZendCon
 
PDF
Firefox OS
Sayak Sarkar
 
PDF
A I R Presentation Dev Camp Feb 08
Abdul Qabiz
 
PDF
Fixing the mobile web - Internet World Romania
Christian Heilmann
 
PPTX
Angularjs Tutorial for Beginners
rajkamaltibacademy
 
KEY
Automating Web Application Deployment
Mathew Byrne
 
PDF
RIA meets Desktop
Peter Elst
 
PDF
Introduction Yii Framework
Tuan Nguyen
 
PDF
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Patrick Lauke
 
PPS
J web socket
Hiroshi Ochi
 
PPTX
Selenium Tutorial-Automate web application on ios safari browser using appium
Mukesh Otwani
 
PPTX
Deploying applications to Cloud with Google App Engine
Alexander Zamkovyi
 
PPTX
Web deploy
Larry Nung
 
PPTX
Web deploy command line
Larry Nung
 
Python, WebRTC and You
Saúl Ibarra Corretgé
 
JavaScript on HP webOS: Enyo and Node.js
Ben Combee
 
Developing Applications for WebOS
Chuq Von Rospach
 
Python Flask app deployed to OPenShift using Wercker CI
Bruno Rocha
 
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
JAX London
 
Selenium WebDriver
Rajathi-QA
 
Joe Staner Zend Con 2008
ZendCon
 
Firefox OS
Sayak Sarkar
 
A I R Presentation Dev Camp Feb 08
Abdul Qabiz
 
Fixing the mobile web - Internet World Romania
Christian Heilmann
 
Angularjs Tutorial for Beginners
rajkamaltibacademy
 
Automating Web Application Deployment
Mathew Byrne
 
RIA meets Desktop
Peter Elst
 
Introduction Yii Framework
Tuan Nguyen
 
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Patrick Lauke
 
J web socket
Hiroshi Ochi
 
Selenium Tutorial-Automate web application on ios safari browser using appium
Mukesh Otwani
 
Deploying applications to Cloud with Google App Engine
Alexander Zamkovyi
 
Web deploy
Larry Nung
 
Web deploy command line
Larry Nung
 

Similar to Mozilla, Firefox OS and the Open Web (20)

PDF
WebAPIs & Apps - Mozilla London
Robert Nyman
 
PDF
Firefox OS workshop, Colombia
Robert Nyman
 
PDF
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Robert Nyman
 
PDF
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Robert Nyman
 
PDF
Firefox OS, the Open Web & WebAPIs - Geek Meet Västerås
Robert Nyman
 
PDF
WebAPIs & WebRTC - Spotify/sthlm.js
Robert Nyman
 
PPTX
Introduction to Apache Cordova (Phonegap)
ejlp12
 
PPTX
Apache Cordova In Action
Hazem Saleh
 
PPTX
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova
Hazem Saleh
 
PPTX
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Frédéric Harper
 
PPTX
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
Hazem Saleh
 
PDF
(Christian heilman) firefox
NAVER D2
 
PDF
Front in recife
Fábio Magnoni
 
PDF
JavaScript APIs - The Web is the Platform
Robert Nyman
 
PPTX
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Frédéric Harper
 
PPT
Firefox os-introduction
zsoltlengyelit
 
PDF
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - GOTO confer...
Robert Nyman
 
PDF
Mozilla Web Apps - Super-VanJS
Robert Nyman
 
PPTX
[Devoxx Morocco 2015] Apache Cordova In Action
Hazem Saleh
 
PDF
Bringing the Open Web & APIs to 
mobile devices with Firefox OS, JSFoo, India
Robert Nyman
 
WebAPIs & Apps - Mozilla London
Robert Nyman
 
Firefox OS workshop, Colombia
Robert Nyman
 
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Robert Nyman
 
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Robert Nyman
 
Firefox OS, the Open Web & WebAPIs - Geek Meet Västerås
Robert Nyman
 
WebAPIs & WebRTC - Spotify/sthlm.js
Robert Nyman
 
Introduction to Apache Cordova (Phonegap)
ejlp12
 
Apache Cordova In Action
Hazem Saleh
 
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova
Hazem Saleh
 
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Frédéric Harper
 
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
Hazem Saleh
 
(Christian heilman) firefox
NAVER D2
 
Front in recife
Fábio Magnoni
 
JavaScript APIs - The Web is the Platform
Robert Nyman
 
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Frédéric Harper
 
Firefox os-introduction
zsoltlengyelit
 
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - GOTO confer...
Robert Nyman
 
Mozilla Web Apps - Super-VanJS
Robert Nyman
 
[Devoxx Morocco 2015] Apache Cordova In Action
Hazem Saleh
 
Bringing the Open Web & APIs to 
mobile devices with Firefox OS, JSFoo, India
Robert Nyman
 
Ad

More from Robert Nyman (20)

PDF
Have you tried listening?
Robert Nyman
 
PDF
Building for Your Next Billion - Google I/O 2017
Robert Nyman
 
PDF
Introduction to Google Daydream
Robert Nyman
 
PDF
Predictability for the Web
Robert Nyman
 
PDF
The Future of Progressive Web Apps - View Source conference, Berlin 2016
Robert Nyman
 
PDF
The Future of the Web - Cold Front conference 2016
Robert Nyman
 
PDF
The Future of Progressive Web Apps - Google for Indonesia
Robert Nyman
 
PDF
Google tech & products
Robert Nyman
 
PDF
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Robert Nyman
 
PDF
Progressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
Robert Nyman
 
PDF
The web - What it has, what it lacks and where it must go - keynote at Riga D...
Robert Nyman
 
PDF
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
Robert Nyman
 
PDF
The web - What it has, what it lacks and where it must go - Istanbul
Robert Nyman
 
PDF
The web - What it has, what it lacks and where it must go
Robert Nyman
 
PDF
Google, the future and possibilities
Robert Nyman
 
PDF
Developer Relations in the Nordics
Robert Nyman
 
PDF
What is Developer Relations?
Robert Nyman
 
PDF
Android TV Introduction - Stockholm Android TV meetup
Robert Nyman
 
PDF
New improvements for web developers - frontend.fi, Helsinki
Robert Nyman
 
PDF
Mobile phone trends, user data & developer climate - frontend.fi, Helsinki
Robert Nyman
 
Have you tried listening?
Robert Nyman
 
Building for Your Next Billion - Google I/O 2017
Robert Nyman
 
Introduction to Google Daydream
Robert Nyman
 
Predictability for the Web
Robert Nyman
 
The Future of Progressive Web Apps - View Source conference, Berlin 2016
Robert Nyman
 
The Future of the Web - Cold Front conference 2016
Robert Nyman
 
The Future of Progressive Web Apps - Google for Indonesia
Robert Nyman
 
Google tech & products
Robert Nyman
 
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Robert Nyman
 
Progressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
Robert Nyman
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
Robert Nyman
 
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
Robert Nyman
 
The web - What it has, what it lacks and where it must go - Istanbul
Robert Nyman
 
The web - What it has, what it lacks and where it must go
Robert Nyman
 
Google, the future and possibilities
Robert Nyman
 
Developer Relations in the Nordics
Robert Nyman
 
What is Developer Relations?
Robert Nyman
 
Android TV Introduction - Stockholm Android TV meetup
Robert Nyman
 
New improvements for web developers - frontend.fi, Helsinki
Robert Nyman
 
Mobile phone trends, user data & developer climate - frontend.fi, Helsinki
Robert Nyman
 
Ad

Recently uploaded (20)

PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 

Mozilla, Firefox OS and the Open Web