SlideShare a Scribd company logo
Bringing the Open Web & APIs to
mobile devices with Firefox OS
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
@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
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
Using HTML5, CSS and
JavaScript together with a
number of APIs to build
apps and customize the UI.
Firefox OS
"Movistar to offer the
ZTE Open for €69,
including €30 of
balance for prepaid
customers and a 4GB
microSD card"
Launch!
Foxconn
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
Open Web Apps
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
HTML5 + manifest file (JSON)
{
"version": "1",
"name": "Firefox OS Boilerplate App",
"launch_path": "/index.html",
"description": "Boilerplate Firefox OS app",
"icons": {
"16": "/images/logo16.png",
"32": "/images/logo32.png",
"48": "/images/logo48.png",
"64": "/images/logo64.png",
"128": "/images/logo128.png"
},
"developer": {
"name": "Robert Nyman",
"url": "http://robertnyman.com"
},
"installs_allowed_from": ["*"],
"default_locale": "en"
}
Build excellent interfaces!
Packaged & hosted apps
WebAPIs
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
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 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");
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
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
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
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
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
Web Apps from Mozilla
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
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
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
Get started
https://addons.mozilla.org/firefox/addon/firefox-os-
simulator/
FIREFOX OS
BOILERPLATE APP
https://github.com/robnyman/Firefox-OS-Boilerplate-App
https://marketplace.firefox.com/
https://marketplace.firefox.com/developers/
Trying things out
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS
Go have some fun!
Robert Nyman
robertnyman.com
robert@mozilla.com
Mozilla
@robertnyman

More Related Content

PDF
Designing the mobile user experience
ZIP
Mobile UX - the intricacies of designing for mobile devices
ZIP
Inspiring new ways of mobile design and development
PDF
Virtual Reality UX - Designing for Interfaces without Screens
PDF
Good design is a myth - by Zoltan Kollin | UXRiga 2017
PDF
UX Joburg: Mobile UX Workshop
PDF
Mobile Usability Evaluation
PPS
Designing The Mobile User Experience
Designing the mobile user experience
Mobile UX - the intricacies of designing for mobile devices
Inspiring new ways of mobile design and development
Virtual Reality UX - Designing for Interfaces without Screens
Good design is a myth - by Zoltan Kollin | UXRiga 2017
UX Joburg: Mobile UX Workshop
Mobile Usability Evaluation
Designing The Mobile User Experience

What's hot (19)

PPTX
Stephan Tanguay - Virtual Intent - User Experience Design In VR / AR
PDF
2013-02-05 UX design for mobile apps
PPTX
The Sixth Sense Technology
PPTX
powerpoint presentation on Google glass
PPTX
smart glasses
PPTX
Stephens patrick mobilepresentation
PDF
Mobile Usability
PDF
The mobile ecosystem & technological strategies
KEY
Learning Times Handheld Conference
PDF
UI Design
PPTX
google glass
PPTX
Google glass The Future Gadget
PPTX
Google glass
KEY
Best Mobile UI Practices - FITC Mobile 2010
PPTX
Veed2 (Updated2)
PPTX
Glass' evolution, some suggestions
PPTX
GOOGLE,ANDROID,GOOGLE GLASS
DOCX
Project glass ieee document
PPTX
Stephan Tanguay - Virtual Intent - User Experience Design In VR / AR
2013-02-05 UX design for mobile apps
The Sixth Sense Technology
powerpoint presentation on Google glass
smart glasses
Stephens patrick mobilepresentation
Mobile Usability
The mobile ecosystem & technological strategies
Learning Times Handheld Conference
UI Design
google glass
Google glass The Future Gadget
Google glass
Best Mobile UI Practices - FITC Mobile 2010
Veed2 (Updated2)
Glass' evolution, some suggestions
GOOGLE,ANDROID,GOOGLE GLASS
Project glass ieee document
Ad

Similar to Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS (20)

PDF
Bringing the Open Web & APIs to 
mobile devices with Firefox OS, JSFoo, India
PDF
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - GOTO confer...
PDF
Firefox OS, the Open Web & WebAPIs - Geek Meet Västerås
PDF
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
PDF
WebAPIs & WebRTC - Spotify/sthlm.js
PDF
Mozilla, Firefox OS and the Open Web
PDF
Firefox OS workshop, Colombia
PDF
Firefox OS Introduction at Bontouch
PDF
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - Geek Meet
PDF
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
PDF
Fixing the mobile web - Internet World Romania
PDF
Firefox OS learnings & visions, WebAPIs - budapest.mobile
PDF
WebRTC & Firefox OS - presentation at Google
PDF
Firefox OS
PDF
Firefox OS workshop, JSFoo, India
PDF
Web APIs & Apps - Mozilla
PDF
(Christian heilman) firefox
PDF
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
PDF
Øredev2013 - FirefoxOS - the platform HTML5 deserves
PDF
HTML for the Mobile Web, Firefox OS
Bringing the Open Web & APIs to 
mobile devices with Firefox OS, JSFoo, India
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - GOTO confer...
Firefox OS, the Open Web & WebAPIs - Geek Meet Västerås
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
WebAPIs & WebRTC - Spotify/sthlm.js
Mozilla, Firefox OS and the Open Web
Firefox OS workshop, Colombia
Firefox OS Introduction at Bontouch
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - Geek Meet
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Fixing the mobile web - Internet World Romania
Firefox OS learnings & visions, WebAPIs - budapest.mobile
WebRTC & Firefox OS - presentation at Google
Firefox OS
Firefox OS workshop, JSFoo, India
Web APIs & Apps - Mozilla
(Christian heilman) firefox
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
Øredev2013 - FirefoxOS - the platform HTML5 deserves
HTML for the Mobile Web, Firefox OS
Ad

More from Robert Nyman (20)

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

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
cuic standard and advanced reporting.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
KodekX | Application Modernization Development
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Cloud computing and distributed systems.
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Machine learning based COVID-19 study performance prediction
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Dropbox Q2 2025 Financial Results & Investor Presentation
Digital-Transformation-Roadmap-for-Companies.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Reach Out and Touch Someone: Haptics and Empathic Computing
NewMind AI Weekly Chronicles - August'25 Week I
cuic standard and advanced reporting.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Spectral efficient network and resource selection model in 5G networks
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
KodekX | Application Modernization Development
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation_ Review paper, used for researhc scholars
Cloud computing and distributed systems.
MYSQL Presentation for SQL database connectivity
Machine learning based COVID-19 study performance prediction
MIND Revenue Release Quarter 2 2025 Press Release
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Bringing the Open Web & APIs to 
mobile devices with Firefox OS - BrazilJS