First Class Mobile Web
Nick Desaulniers
Software Engineer @ Mozilla
3rd Party App Support
Simulator Core
Rust Contributor
Firefox OS is a free open source operating system for mobile devices
being developed by Mozilla, telecom operators, handset and chipset
manufacturers, and volunteers.
Firefox OS looks to be there for the next two billion people connecting to the web, through low cost mobile devices.
Gaia
Gecko
Gonk
The choice of packaging model comes down to need for Device APIs and hosting of assets.
Assets of packaged apps are zipped. Device APIs require packaging for security and review. Packaging an app can also be done to avoid hosting.
"I would like to use a privileged device API." Subject to CSP.
"I'm not interested in device APIs, but I would prefer to avoid hosting."
"I'm not interested in device APIs, and I'm cool with hosting assets somewhere."
Most apps will probably fall under this category (ie. existing mobile web apps).
Mozilla and carriers only. Typically because APIs are sensitive or unstable.
Apps are differentiated by their origin. Origin = protocol + subdomain + domain + port
JSON encoded file that tells the OS about your app.
App Manifest (MDN){ "name": "Firefox OS Presentation", "version": "0.1", "description": "My Presentation", "developer": { "name": "Nick Desaulniers", "url": "https://nickdesaulniers.github.io" }, "icons": { "60": "/60.png", "128": "/128.png" }, "fullscreen": true }
Manifest must be served with MIME type:
application/x-web-app-manifest+json
Make sure your manifest is valid JSON! I recommend always double checking with JSONLint.
Github will serve your manifest with the right mime type, so you can host an app from Github!
Apps receive a receipt when installed. Mozilla provides verification service.
navigator.mozPay(jwt);
Mozilla Persona is a cross-browser login system for the Web that's easy to use and easy to deploy. Not required for Firefox OS.
Useful for inter-app communication. Listen for or invoke different activities.
Docs (MDN)Let me know what you thought about this talk.