Firefox OS - Einführung

Firefox OS - Einführung

Firefox OS - be the future

About me

  • Michael Kohler
  • volonteering for Mozilla since 2008
  • Mozilla Representative since 2012
  • Banking Software Engineer by day
  • Web Developer by night
Mozilla Reps Logo

Back then...

(well, a few years ago)

Booting to the Web

To that end, we propose a project we’re calling "Boot to Gecko" [..] (B2G) to pursue the goal of building a complete, standalone operating system for the open web.

First response

Very very exciting!

Clinton inauguration vs Obama inauguration

Hey - we don't have to talk anymore!

people with smartphones

Not yet online with a smartphone

people with papers

It started well…

iPhone without an SDK

Jobs' original vision - no third party native apps

Then it got awkward…

Awkward, who is the mobile web for? Web developers or native developers

A competitive, closed market

Apple, Samsung and Nokia

Not web developer's struggle…
or is it?

apple vs. android

So many tools:

  • Bootstrap
  • Grunt
  • Ember
  • Backbone
  • jQuery
  • Sencha
  • Hammer.js
  • Emmett
  • Compass
  • SASS
  • LESS
  • Zepto.js
  • Angular.js
  • Dart
  • Livescript
  • Jasmine
  • Node.js
  • npm
  • Moustache
  • ...

Many, many, many awesome demos…

Lots of shiny demos

http://fff.cmiscm.com/

We have an awesome overload!

Vomiting rainbows

Mozilla's Mission - The Open Web

This is for everyone

The Internet the World Needs

Knowable

The Internet the World Needs

Interoperable

The Internet the World Needs

Ours

Consumers and creators

Mozilla webmaker

Replacing feature phones

Nokia couldn't take photos

the base

Gonk

the rendering

Gecko

the graphical user interface

Gaia

Development is done in the open!

  • GitHub
  • Documentation on MDN (developer.mozilla.org)
  • IRC Channels
  • Mailing lists

Announcement - MWC 2012

Telefónica and Mozilla are developing this HTML5 operating system on a hardware platform that is based upon a Qualcomm chipset.
- Telefonica Press Release

Firefox OS

Firefox OS

Demo - MWC 2013

HTML5 is mobile

Developer phones - Spring 2013

Keon

First launch - Spain - Juli 2013

Store

Launch in Germany - Congstar.de

Store

Many phones

World wide web

Many new possibilites

Medic

NOW

Everything in the OS is open web technology and standard proposals

firefox os emulator and source

Open WebApps

Firefox OS apps

What makes a great app?

Work with others…

Foxkeh loves android

Defined by manifest

        {
          "name": "My App",
          "description": "My elevator pitch goes here",
          "launch_path": "/",
          "icons": { "128": "/img/icon-128.png" },
          "developer": {
            "name": "Your name or organization",
            "url": "http://your-homepage-here.org"
          }
        }
      

App manifest

Three levels of access…

  • Hosted apps - stored on your server, easy to upgrade, limited access.
  • Privileged apps - reviewed by the App store, packaged and signed
  • Certified apps - part of the OS, only by Mozilla and partners

App permissions

Install apps from the web

        var installapp = navigator.mozApps.install(manifestURL);
        installapp.onsuccess = function(data) {
          // App is installed
        };
        installapp.onerror = function() {
         // App wasn't installed, info is in 
         // installapp.error.name
        };
        

Web APIs (hosted apps)

  • Vibration API
  • Screen Orientation
  • Geolocation API
  • Mouse Lock API
  • Open WebApps
  • Network Information API
  • Battery Status API
  • Alarm API
  • Push Notifications API
  • WebFM API / FMRadio
  • WebPayment
  • IndexedDB
  • Ambient light sensor
  • Proximity sensor
  • Notification

Using WebAPIs to make the web layer more capable

Battery API

          var b = navigator.battery;
          if (b) {
            var level = Math.round(b.level * 100) + "%",
                charging = (b.charging) ? "" : "not ",
                chargeTime = parseInt(b.chargingTime / 60, 10),
                dischargeTime = parseInt(b.dischargingTime/60,10);
            b.addEventListener("levelchange", show);
            b.addEventListener("chargingchange", show);
            b.addEventListener("chargingtimechange", show);
            b.addEventListener("dischargingtimechange", show);
          }
        

Web APIs (privileged apps)

  • Device Storage API
  • Browser API
  • TCP Socket API
  • Contacts API
  • systemXHR

Using WebAPIs to make the web layer more capable

Contacts API

          var contact = new mozContact();
          contact.init({name: "Christian"});
          var request = navigator.mozContacts.save(contact);
          request.onsuccess = function() {
            // contact generated
          };
          request.onerror = function() {
            // contact generation failed
          };
        

Web APIs (certified apps)

  • WebTelephony
  • WebSMS
  • Idle API
  • Settings API
  • Power Management API
  • Mobile Connection API
  • WiFi Information API
  • WebBluetooth
  • Permissions API
  • Network Stats API
  • Camera API
  • Time/Clock API
  • Attention screen
  • Voicemail

Using WebAPIs to make the web layer more capable

Get an image from the phone (1/2)

Pick activity
        var getphoto = new MozActivity({
          name: "pick",
          data: {
            type: ["image/png", 
                   "image/jpg", 
                   "image/jpeg"]
          }
        });
      

Get an image from the phone (2/2)

        getphoto.onsuccess = function () {
          var img = document.createElement("img");
          if (this.result.blob.type.indexOf("image") != -1) {
            img.src = window.URL.createObjectURL(this.result.blob);
          }
        };
        getphoto.onerror = function () { // error
        };
      

Debugger

Developer tools debugger

Firefox OS UI components

Building Firefox OS

Building FirefoxOS

Apache Cordova (Version 3.4+)

Apache Cordova

Firefox OS Marketplace

Firefox OS Marketplace

https://marketplace.firefox.com/

DEMO!

FUTURE

Haida Part 1 (Caution: this is a mockup!)

Haida Mockup

Haida Part 2 (Caution: this is a mockup!)

Haida Mockup

WebRTC H264

Ringtones

NFC Use-Cases

Firefox Accounts

Find My Device

Text selection

Copy/Paste

Performance

and more!

Teach!

apps.webmaker.org (Appmaker)

Appmaker screenshot

Webmaker - Teach the web

Webmaker screenshot

The German-speaking community

  • www.mozilla.de
  • @mozilla_deutsch - follow it now!
  • irc.mozilla.org #mozilla.de
  • Community mailing list: bit.ly/MozDeMail

Thanks

Red panda (Firefox)
  • Michael Kohler
  • Mozilla Reps
  • @KohlerSolutions

  • Slides:
    bit.ly/mobilecamp-firefoxos
Photo by Yortw