Firefox OS - Creating your own app and hack Firefox OS itself

Firefox OS - Creating your own app and hack Firefox OS itself

Mozilla

About me

  • Michael Kohler
  • volunteering for Mozilla since 2008
  • Mozilla Representative since 2012
  • Web Developer @netcase.ch
  • mkohler.dev
Mozilla Reps Logo

@mozilla_deutsch

Appmaker Screenshot

Simulator

Simulator

WebIDE - Demo

WebIDE

https://wiki.mozilla.org/WebAPI

webapi table pic

Common WebAPI

  • Vibration API
  • Geolocation API
  • Battery Status API
  • Push Notification API
  • Contacts API

Interesting WebAPI (certified)

  • WebTelephony
  • WebSMS
  • WebFM API
  • WebPayment API
  • WebBluetooth API
  • WebNFC

Some examples..

Vibration API (complicated form)

window.navigator.vibrate([200, 100, 200]);

Geolocation API

navigator.geolocation.getCurrentPosition(function(position) {
          do_something(position.coords.latitude,
              position.coords.longitude);
        });
      

Battery Status API

navigator.getBattery().then(function(battery) {
        battery.addEventListener('chargingchange', function() {
          console.log("Battery charging? " + (battery.charging ? "Yes" : "No"));
        });

        battery.addEventListener('levelchange', function() {
          console.log("Battery level: " + battery.level * 100 + "%");
        });

        battery.addEventListener('chargingtimechange', function() {
          console.log("Battery charging time: " + battery.chargingTime + " seconds");
        });

        battery.addEventListener('dischargingtimechange', function() {
          console.log("Battery discharging time: " + battery.dischargingTime + " seconds");
        });
      });

WebNFC

developer.mozilla.org
(MDN)

Cordova Target

Existing Website + Manifest

Manifest

{ "name": "Cool App",
        "description": "This app lets you do ...",
        "icons": {
          "128": "/img/icon-128.png"
        },
        "fullscreen": true,
        "orientations": ["portrait","landscape-secondary"],
        "developer": {
          "name": "Max Mustermann",
          "url": "http://mozilla.org"
        }}
Marketplace

Hacking Gaia

Hacking Gaia

We're here to help!

Demo phones for testing available

Thanks

Red panda (Firefox) Photo by Yortw