SlideShare a Scribd company logo
Firefox OS
Python Montreal
HTML5 to the next level
2014-05-12
Frédéric Harper
Sr. Technical Evangelist @ Mozilla
@fharper | outofcomfortzone.net
CreativeCommons:https://bitly.com/RwaQxN
print("Sorry, I don’t speak Python")
Creative Commons: http://j.mp/1hCZYIe
Creative Commons: http://j.mp/1ljZuJC
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
38 billion devices
connected in 2020
ABI Research - 2013-05-09 - http://j.mp/38billion
Creative Commons: http://j.mp/1gP4X4K
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
What you deserve
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
Built with the Web
Using HTML5, CSS3 and JavaScript
with a number of APIs
to build apps.
It’s open source
Some facts
§  7 operator (17 committed) & 4 hardware partners
§  ZTE Open, Alcatel One Touch Fire, Geeksphone Keon,
Geeksphone Peak, LG FireWeb…
§  More to come: Flame, Huawei Y300, ZTE Open C,
Alcatel One Touche Fire C & E & S…
§  Aimed at emerging markets/low end market
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
A Firefox OS app?
§  Creating a hosted or packaged app
§  Using
§  Vanilla HTML5
§  Librairies…
§  Regular API
§  Privileged API
§  Certified API
HTML5 + manifest (JSON) = Firefox OS app
{	
"version": “42",	
"name": ”My amazing app",	
"launch_path": "/index.html",	
"description": ”My super amazing app do super amazing things",	
"icons": {	
"16": "/images/logo16.png”,},	
"developer": {	
"name": ”Frédéric Harper",	
"url": "http://outofcomfortzone.net",	
},	
"default_locale": "en",	
"permissions": {	
"geolocation": {	
"description": ”Get the long/lat of the user"	
}	
}	
}
DEMO App Manager + Emberjs todomvc
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);	
});
DEMO Boilerplate – Ambient Light Sensor
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);	
}
DEMO Boilerplate – Battery status
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“ 	 	 	"mozbrowserloadend"	
	"mozbrowserlocationchange“ 	 	"mozbrowsertitlechange"	
	"mozbrowsericonchange“ 	 	 	"mozbrowsersecuritychange"	
	"mozbrowsercontextmenu“ 	 	 	"mozbrowsererror"	
	"mozbrowserkeyevent“ 	 	 	"mozbrowsershowmodalprompt"	
	"mozbrowseropenwindow“ 	 	 	"mozbrowserclose"	
*/
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/OEM
Web Activities
Web Activities
•  browse
•  configure
•  costcontrol
•  dial
•  Open
•  new
•  mail
•  websms/sms
•  webcontacts/contact
•  pick
•  record
•  save-bookmark
•  share
•  view
•  update
packaged
hosted
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"	
}	
});
Web Activity Received Handler
"activities": {	
"pick": {	
"filters": {	
"type": ["image/jpeg", "image/png"]	
},	
"disposition": "inline",	
"returnValue": true, 	
"href": "/index.html#pick"	
}	
}
Don’t forget to handle it!
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");	
}	
}	
});
Creative Commons: http://j.mp/1iZHGAW
How to start
Creative Commons: http://j.mp/1iquK8Q
Creative Commons: http://j.mp/Ilm7wx
Cordova & Phonegap
API implementations
•  Camera
•  Contacts
•  Device
•  Device-motion
•  Geolocation
•  Orientation
•  Vibration
Free phone!
http://j.mp/mozPFA
Creative Commons: https://flic.kr/p/epEL3n
Simplicity…
Firefox Web Developer Tools
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12
Creative Commons: http://j.mp/1gIdcPF
To infinity, and
beyond…
More Web APIs & features
•  Calendar API
•  FileHandle API Sync API
•  Keyboard/IME API WebRTC
•  HTTP-cache API
•  Peer to Peer API
•  Spellcheck API LogAPI
•  Resource lock API
•  UDP Datagram Socket API
•  WebNFC
•  WebUSB
When you’ll build your next app
You know you’ll have the API you need using HTML5
Resources
Firefox OS Simulator
http://j.mp/fxosSimulator
Firefox OS App Manager
http://j.mp/fxosAppManager
Mozilla Developer Network
https://developer.mozilla.org
StackOverflow forum
http://j.mp/fxosStackOverflow
Firefox OS Boilerplate
http://j.mp/fxosBoilerplate
Planning to port
or build a
Firefox OS app?
Please let me know!
http://yuldev.ca
Frédéric Harper
fharper@mozilla.com
@fharper
http://hacks.mozilla.com
http://outofcomfortzone.net

More Related Content

What's hot (8)

PPTX
Phone Gap
Yiguang Hu
 
PPTX
Im flash
huanwu
 
PDF
What's new in iOS9
CocoaHeads France
 
ODP
Non Conventional Android Programming En
guest9bcef2f
 
PDF
Future of Development and Deployment using Docker
Tamer Abdul-Radi
 
PDF
API Days Paris - Automatic Testing of (RESTful) API Documentation
Rouven Weßling
 
PDF
Leaving Interface Builder Behind
John Wilker
 
PDF
Go Serverless with Cloud Functions and Python
mfazal
 
Phone Gap
Yiguang Hu
 
Im flash
huanwu
 
What's new in iOS9
CocoaHeads France
 
Non Conventional Android Programming En
guest9bcef2f
 
Future of Development and Deployment using Docker
Tamer Abdul-Radi
 
API Days Paris - Automatic Testing of (RESTful) API Documentation
Rouven Weßling
 
Leaving Interface Builder Behind
John Wilker
 
Go Serverless with Cloud Functions and Python
mfazal
 

Similar to Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12 (20)

PDF
HTML pour le web mobile, Firefox OS - Devfest Nantes - 2014-11-07
Frédéric Harper
 
PDF
Øredev2013 - FirefoxOS - the platform HTML5 deserves
Christian Heilmann
 
PDF
WebAPIs & WebRTC - Spotify/sthlm.js
Robert Nyman
 
PDF
Web APIs & Apps - Mozilla
Robert Nyman
 
PDF
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Robert Nyman
 
PDF
WebAPIs & Apps - Mozilla London
Robert Nyman
 
PDF
JavaScript APIs - The Web is the Platform
Robert Nyman
 
KEY
Intro To webOS
fpatton
 
PDF
Firefox OS learnings & visions, WebAPIs - budapest.mobile
Robert Nyman
 
PDF
Firefox OS
Sayak Sarkar
 
KEY
Mobile HTML, CSS, and JavaScript
franksvalli
 
PDF
混搭移动开发:PhoneGap+JQurey+Dreamweaver
yangdj
 
PDF
After max+phonegap
yangdj
 
PPTX
HTML5 on Mobile
Adam Lu
 
PDF
Firefox OS - HTML5 for a truly world-wide-web
Christian Heilmann
 
PDF
Firefox OS workshop, JSFoo, India
Robert Nyman
 
PDF
Google Back To Front: From Gears to App Engine and Beyond
dion
 
PPT
Firefox os-introduction
zsoltlengyelit
 
PPTX
HTML5 WebWorks
Raul Jimenez
 
PDF
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - Geek Meet
Robert Nyman
 
HTML pour le web mobile, Firefox OS - Devfest Nantes - 2014-11-07
Frédéric Harper
 
Øredev2013 - FirefoxOS - the platform HTML5 deserves
Christian Heilmann
 
WebAPIs & WebRTC - Spotify/sthlm.js
Robert Nyman
 
Web APIs & Apps - Mozilla
Robert Nyman
 
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Robert Nyman
 
WebAPIs & Apps - Mozilla London
Robert Nyman
 
JavaScript APIs - The Web is the Platform
Robert Nyman
 
Intro To webOS
fpatton
 
Firefox OS learnings & visions, WebAPIs - budapest.mobile
Robert Nyman
 
Firefox OS
Sayak Sarkar
 
Mobile HTML, CSS, and JavaScript
franksvalli
 
混搭移动开发:PhoneGap+JQurey+Dreamweaver
yangdj
 
After max+phonegap
yangdj
 
HTML5 on Mobile
Adam Lu
 
Firefox OS - HTML5 for a truly world-wide-web
Christian Heilmann
 
Firefox OS workshop, JSFoo, India
Robert Nyman
 
Google Back To Front: From Gears to App Engine and Beyond
dion
 
Firefox os-introduction
zsoltlengyelit
 
HTML5 WebWorks
Raul Jimenez
 
Bringing the Open Web & APIs to 
mobile devices with Firefox OS - Geek Meet
Robert Nyman
 
Ad

More from Frédéric Harper (20)

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

Recently uploaded (20)

PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 

Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12