Firefox OS
the platform you deserve
Frédéric Harper
Senior Technical Evangelist @ Mozilla
@fharper | outofcomfortzone.net

Athens Apps Day
Athens, Greece
2013-11-27
Συγνώμη,
δεν μιλούν
ελληνικά
Thanks Google translate…
What you deserve
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS
Using HTML5, CSS3 and JavaScript

with a number of APIs
to build apps.
It’s open source
Architecture
Benefits of HTML5
 In-built distribution – the Web
 Simple technologies used by a lot of developers
 Evolution of existing practices
 Open, independent, and standardised
Some facts
 Released in Spain, Poland, Venezuela, Hungary, Colombia, Uruguay,
Mexico, Brazil, and Greece
 18 mobile operator, and 6 hardware partners
 Hardware options: ZTE Open, Alcatel One Touch Fire, Geeksphone
Keon, Geeksphone Peak, LG FireWeb…
 Aimed at emerging markets/low end market
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
HTML5 + manifest (JSON) = Firefox OS app
{
"version": "1",
"name": "Firefox OS Boilerplate App",

"launch_path": "/index.html",
"description": "Boilerplate Firefox OS app with example use cases to get started",
"icons": {
"16": "/images/logo16.png”,},
"developer": {
"name": "Robert Nyman",
"url": http://robertnyman.com
},
"default_locale": "en",
"permissions": {
"geolocation": {

"description": "Marking out user location"
}
}
}
A Firefox OS app?
 Creating a hosted or packaged app

 Using


Vanilla HTML5



Regular API



Privileged API



Certified API
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Web APIs
Web APIs – Regular
•
•
•
•
•
•
•
•

Alarm API
Ambient light sensor
Archive API
Battery Status API
Geolocation API
IndexedDB
Network Information API
Notifications API

•
•
•
•
•
•
•
•

Open WebApps
Proximity sensor
Push API
Screen Orientation
Vibration API
Web Activities
WebFM API
WebPayment

packaged

hosted
Ambient Light Sensor
Ambient Light Sensor
window.addEventListener("devicelight", function (event) {

// The level of the ambient light in lux
// The lux values for "dim" typically begin below 50,
// and the values for "bright" begin above 10000
console.log(event.value);

});
Battery Status
Battery Status
var battery = navigator.battery;

if (battery) {
var batteryLevel = Math.round(battery.level * 100) + "%",

charging = (battery.charging)? “yes" : "no",

chargingTime = parseInt(battery.chargingTime / 60, 10,
dischargingTime = parseInt(battery.dischargingTime / 60, 10);

battery.addEventListener("levelchange", setStatus, false);
battery.addEventListener("chargingchange", setStatus, false);
battery.addEventListener("chargingtimechange", setStatus, false);
}
Web APIs – Privileged
•
•
•
•
•

Browser API
Contacts API
Device Storage API
systemXHR
TCP Socket API

packaged
Browser
Browser
<div>
<span id='location-bar'></span>

<button onclick='go_button_clicked()'>Go</button>
</div>
<div id='load-status'></div>
<div id='security-status'></div>

<img id='favicon'>
<div id='title'></div>
<iframe mozbrowser src=‘yoursite.com' id='browser'></iframe>
Browser
addEventListener('mozbrowserloadstart', function(e) {
//Do stuff

});

/*
Possible values:

"mozbrowserloadstart“
"mozbrowserlocationchange“

"mozbrowsertitlechange"

"mozbrowsericonchange“

"mozbrowsersecuritychange"

"mozbrowsercontextmenu“

"mozbrowsererror"

"mozbrowserkeyevent“

"mozbrowsershowmodalprompt"

"mozbrowseropenwindow“
*/

"mozbrowserloadend"

"mozbrowserclose"
Contacts
Contacts
var contact = new mozContact();
contact.init({name: "Tom"});

var request = navigator.mozContacts.save(contact);
request.onsuccess = function() {
console.log("Success");

};

request.onerror = function() {
console.log("Error")
};
Web APIs – Certified
•
•
•
•
•
•
•
•

Camera API
Idle API
Mobile Connection API
Network Stats API
Permissions API
Power Management API
Settings API
Time/Clock API

•
•
•
•
•

Voicemail
WebBluetooth
WebSMS
WebTelephony
WiFi Information API

OS
Web Activities
Web Activities
•
•
•
•
•
•
•
•

browse
configure
costcontrol
dial
open
pick
record
save-bookmark

•
•
•
•

share
view
update
new
•
•
•

mail
websms/sms
webcontacts/contact
Pick
var activity = new MozActivity({
name: "pick",
//Provide the data required
//by the filter of the activity
data: {
type: "image/jpeg"
}
});
Pick
activity.onsuccess = function () {
var img = document.createElement("img");

if (this.result.blob.type.indexOf("image") != -1) {
img.src = window.URL.createObjectURL(this.result.blob);
}
};

activity.onerror = function () {
//error
};
Dial
var call = new MozActivity({
name: "dial",
data: {
number: "+46777888999"
}
});
new webcontacts/contact
var newContact = new MozActivity({
name: "new",
data: {
type: "webcontacts/contact",
params: {
givenName: "Frédéric",
lastName: "Harper",
email: ”fharper@mozilla.com",
company: "Mozilla"
}
}

});
Web Activity Received Handler
navigator.mozSetMessageHandler('activity', function(activityRequest) {
var option = activityRequest.source;

if (activityRequest.source.name === "pick") {

// Do something to handle the activity
if (picture) {
activityRequest.postResult(picture);
}
else {
activityRequest.postError("Unable to provide a picture");

}
}
});
Don’t forget the manifest
"activities": {
"pick": {
"filters": {
"type": ["image/jpeg", "image/png"]
},
"disposition": "inline",
"returnValue": true,
"href": "/index.html#pick"
}
}
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
How to start
Creative Commons: http://j.mp/Ilm7wx
Phonegap
Firefox OS Simulator
Firefox OS App Manager
Firefox Web Developer Tools
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Some candies
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Prototyping with JSFiddle
• Append /webapp.manifest to

install the app in the Firefox
OS simulator

• Append /fxos.html to get an
install page like a Firefox OS

hosted app.
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
What’s next
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
More Web APIs & features
• Calendar API

• Spellcheck API LogAPI

• FileHandle API Sync API

• Resource lock API

• Keyboard/IME API WebRTC • UDP Datagram Socket API
• HTTP-cache API

• WebNFC

• Peer to Peer API

• WebUSB
To infinity, and
beyond… it’s only
the beginning!

Creative Commons: http://j.mp/1gIdcPF
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Resources
Firefox OS Simulator
http://j.mp/fxosSimulator
Firefox OS App Manager
http://j.mp/fxosAppManager
Mozilla Developer Network
https://developer.mozilla.org

Firefox OS WebAPI & Web Activities
http://j.mp/fxosWebAPI
Resources
StackOverflow forum
http://j.mp/fxosStackOverflow
Firefox OS Boilerplate
http://j.mp/fxosBoilerplate
Firefox OS UI Component
http://buildingfirefoxos.com/

Mozilla Brick
http://j.mp/mozBrick
Frédéric Harper
fharper@mozilla.com

@fharper
http://hacks.mozilla.com
http://outofcomfortzone.net

More Related Content

PPTX
Welcome Firefox OS in india with your app - Mumbai Firefox OS hackathon - 201...
PPSX
Selenium WebDriver
PDF
Web APIs & Apps - Mozilla
PDF
Firefox OS, the Open Web & WebAPIs - LXJS, Portugal
PPTX
HTML5 WebWorks
PPTX
Html5 features: location, history and offline apps
PDF
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
PDF
Building a Next Generation Mobile Browser using Web technologies
Welcome Firefox OS in india with your app - Mumbai Firefox OS hackathon - 201...
Selenium WebDriver
Web APIs & Apps - Mozilla
Firefox OS, the Open Web & WebAPIs - LXJS, Portugal
HTML5 WebWorks
Html5 features: location, history and offline apps
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
Building a Next Generation Mobile Browser using Web technologies

What's hot (19)

PDF
Revue des annonces WWDC2015
PPTX
Html5 on Mobile(For Developer)
PDF
Web Apps and more
PDF
Always on! ... or not?
PPTX
Building Secure User Interfaces With JWTs
PDF
Sencha touchonbb10 bootcamp
PPTX
Browser Security 101
PDF
Sg conference multiplatform_apps_adam_stanley
PDF
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - GOTO confer...
PPTX
HTML5 on Mobile
KEY
Video.js - How to build and HTML5 Video Player
ZIP
Develop Flash Lite App in Nokia S60
DOC
Video embed from atickam.txt
PDF
Framework dynamic par Simone Sivetta
PDF
Crossing the Boundaries of Web Applications with OpenSocial
PDF
What's this jQuery? Where it came from, and how it will drive innovation
PDF
Mobile Web Development with HTML5
PPTX
Windows Azure Toolkit for iOS
PPTX
JavaScript on HP webOS: Enyo and Node.js
Revue des annonces WWDC2015
Html5 on Mobile(For Developer)
Web Apps and more
Always on! ... or not?
Building Secure User Interfaces With JWTs
Sencha touchonbb10 bootcamp
Browser Security 101
Sg conference multiplatform_apps_adam_stanley
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - GOTO confer...
HTML5 on Mobile
Video.js - How to build and HTML5 Video Player
Develop Flash Lite App in Nokia S60
Video embed from atickam.txt
Framework dynamic par Simone Sivetta
Crossing the Boundaries of Web Applications with OpenSocial
What's this jQuery? Where it came from, and how it will drive innovation
Mobile Web Development with HTML5
Windows Azure Toolkit for iOS
JavaScript on HP webOS: Enyo and Node.js
Ad

Similar to Firefox OS - The platform you deserve - Athens App Days - 2013-11-27 (20)

PPTX
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
PDF
HTML for the Mobile Web, Firefox OS
PDF
Fixing the mobile web - Internet World Romania
PDF
(Christian heilman) firefox
PPT
Firefox os-introduction
PDF
Øredev2013 - FirefoxOS - the platform HTML5 deserves
PDF
Firefox OS, HTML5 pour le mobile - Code(love) Hackathon - 2014-05-28
PDF
Firefox OS workshop, JSFoo, India
PPTX
Firefox OS Web APIs, taking it to the next level
PDF
Firefox OS
PDF
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
PDF
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
PDF
Firefox OS - Answering global challenges
PDF
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
PPT
What is Firefox OS
PDF
Firefox OS - HTML5 for a truly world-wide-web
PPTX
Firefox OS, a startup opportunity - Mobile Startups Toronto & HTML Toronto me...
PDF
HTML for the Mobile Web, Firefox OS - All Things Open - 2014-10-22
KEY
Open Web Device: The first phone running Firefox OS!
PDF
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - Geek Meet
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
HTML for the Mobile Web, Firefox OS
Fixing the mobile web - Internet World Romania
(Christian heilman) firefox
Firefox os-introduction
Øredev2013 - FirefoxOS - the platform HTML5 deserves
Firefox OS, HTML5 pour le mobile - Code(love) Hackathon - 2014-05-28
Firefox OS workshop, JSFoo, India
Firefox OS Web APIs, taking it to the next level
Firefox OS
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Firefox OS - Answering global challenges
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
What is Firefox OS
Firefox OS - HTML5 for a truly world-wide-web
Firefox OS, a startup opportunity - Mobile Startups Toronto & HTML Toronto me...
HTML for the Mobile Web, Firefox OS - All Things Open - 2014-10-22
Open Web Device: The first phone running Firefox OS!
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - Geek Meet
Ad

More from Frédéric Harper (20)

PDF
2017-11-09 - Fitbit Norcal Developers Meetup (fred)
PDF
2018 04-25 - HLTH hackathon
PDF
2018-06-07 - Singapore Fitbit Developers - Fitbit SDK & Web API Overview
PDF
2018 06-05 - Tokyo Fitbit Developers - Fitbit SDK & Web API Overview
PDF
Public speaking - FDP tech leads summit - 2018-04-30
PDF
2018 04-25 - HLTH hackathon
PDF
From employee to freelance developer in 10 steps - DevTeach - 2017-07-04
PDF
Infrastructure as a service to its maximum, a cultural change - S2LQ - 2016-0...
PDF
With great power comes great responsibility - Microsoft Canada Open Source co...
PDF
Frédéric harper i don’t like open source, and you shouldn't like it eithe...
PDF
Responsive Web Design, the secret sauce - MSDEVMTL - 2016-01-25
PDF
Responsive Web Design: the secret sauce - JavaScript Open Day Montreal - 2015...
PDF
Is your python application secure? - PyCon Canada - 2015-11-07
PDF
Personal branding for developers - West Island developers and entrepreneurs m...
PDF
Responsive Web Design, get the best out of your designs - JavaScript Open Day...
PDF
Differentiating yourself humber college - 2015-03-30
PDF
Differentiating yourself - Hack Western - 2015-03-28
PDF
Le personal branding, plus important que jamais - PHP Québec - 2015-03-05
PDF
Building a personal brand in the developer community - Codementor Office Hour...
PDF
Ma Carrière Techno - École secondaire St-Henri - 2014-11-27
2017-11-09 - Fitbit Norcal Developers Meetup (fred)
2018 04-25 - HLTH hackathon
2018-06-07 - Singapore Fitbit Developers - Fitbit SDK & Web API Overview
2018 06-05 - Tokyo Fitbit Developers - Fitbit SDK & Web API Overview
Public speaking - FDP tech leads summit - 2018-04-30
2018 04-25 - HLTH hackathon
From employee to freelance developer in 10 steps - DevTeach - 2017-07-04
Infrastructure as a service to its maximum, a cultural change - S2LQ - 2016-0...
With great power comes great responsibility - Microsoft Canada Open Source co...
Frédéric harper i don’t like open source, and you shouldn't like it eithe...
Responsive Web Design, the secret sauce - MSDEVMTL - 2016-01-25
Responsive Web Design: the secret sauce - JavaScript Open Day Montreal - 2015...
Is your python application secure? - PyCon Canada - 2015-11-07
Personal branding for developers - West Island developers and entrepreneurs m...
Responsive Web Design, get the best out of your designs - JavaScript Open Day...
Differentiating yourself humber college - 2015-03-30
Differentiating yourself - Hack Western - 2015-03-28
Le personal branding, plus important que jamais - PHP Québec - 2015-03-05
Building a personal brand in the developer community - Codementor Office Hour...
Ma Carrière Techno - École secondaire St-Henri - 2014-11-27

Recently uploaded (20)

PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PPTX
Microsoft User Copilot Training Slide Deck
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PPTX
Internet of Everything -Basic concepts details
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
Flame analysis and combustion estimation using large language and vision assi...
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
Auditboard EB SOX Playbook 2023 edition.
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PPTX
Configure Apache Mutual Authentication
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
Comparative analysis of machine learning models for fake news detection in so...
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
Microsoft User Copilot Training Slide Deck
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Internet of Everything -Basic concepts details
NewMind AI Weekly Chronicles – August ’25 Week IV
Flame analysis and combustion estimation using large language and vision assi...
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
Basics of Cloud Computing - Cloud Ecosystem
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
Auditboard EB SOX Playbook 2023 edition.
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Rapid Prototyping: A lecture on prototyping techniques for interface design
Configure Apache Mutual Authentication
MuleSoft-Compete-Deck for midddleware integrations
Consumable AI The What, Why & How for Small Teams.pdf
Early detection and classification of bone marrow changes in lumbar vertebrae...
Comparative analysis of machine learning models for fake news detection in so...

Firefox OS - The platform you deserve - Athens App Days - 2013-11-27

Editor's Notes

  • #2: START CAMTASIASTART ZOOM ITThis presentation is 30 minutesHi, my name is Frédéric HarperI’m a Senior Technical Evangelist at Mozilla focussing on the Open Web with Firefox OSFeel free to tweet about the presentation by adding my Twitter handle @fharper.Good or bad things, I won’t be upset!You can also go, after the presentation, to my personal blog at outofcomfortzone.net or for the lazy one, occz.netYou don’t have to take notes from what you see on the slides, as the slides will be made available on my site soon after the event
  • #17: Let’s start with the Ambien light APIThis API will give you the ability to get values about the ambient light
  • #18: It’s quite simple, you need to add a listener on devicelightYour function will get call when the ambient light will changeYou’ll get a value in lux
  • #19: The next one is kind of obviousIt will give you information on the battery
  • #20: You can get the battery level by getting the value of navigator.battery.levelYou can also do this for charging time, and discharging timeAnother way is to manage event listener on the levelchange, chargingchange, and chargingtimechangeIt’s not just useful for a battery information app, but you can take advantage of it
  • #22: The name of this API is pretty clearI remember many native applications on other platform that were just windows on HTML applicationNow since your application is HTML, the utility for this API would be to let the user navigate to an external websiteIt could be helpful if you have to made the user log in into a third party services, and approve a key for your application, as an example
  • #23: You can add a browser iframe in your application, by adding some codeNote that the important part is the mozbrowser attribute in the iframe elementIf you also want to have a kind of full browser experience, you can add the other elements with those IDs
  • #24: You can also add different listener for different action from the users, but also from the browser iframe
  • #25: Another nice privileged API give you access to the contact list
  • #26: You can get add, modify, and delete a contact to the listYou can also find, and select all contactsThis code example show you how to add a contact to the address book of the user’s phone
  • #49: Firefox OS UI component
  • #55: Caution, danger, this platform can be addictive!
  • #58: Feel free to follow me on Twitter or add me to LinkedInIf you want to read some amazing technical posts on Firefox, Firefox OS, Developer Tool, and the Open Web, please check our hacks blogLast, but not least, you can check my personal blog: it’s all about gnomes, and unicorns