SlideShare a Scribd company logo
1 of 116
Download to read offline
FIREFOX OS
  WebAPIs & Apps
@robertnyman
Using HTML5, CSS and
JavaScript together with a
number of APIs to build apps
and customize the UI.
https://addons.mozilla.org/firefox/addon/firefox-os-
                    simulator/
Open Web Apps
Web apps are apps built using standard Web technologies. They
             work in any modern Web browser.

The Open Web apps project proposes some small additions to
          existing sites to turn them into apps.

   These apps run on desktop browsers and mobile devices.
https://developer.mozilla.org/docs/Apps/
             Getting_Started
Steps to Take
Develop Web App using
1.   HTML5, CSS, & Javascript


2.   Create an app manifest file



3.   Publish/install the app
1.
Develop Web App using
HTML5, CSS & JavaScript
Reuse any existing web site/app or develop from scratch with open
                          web standards.

   Utilize HTML5 features such as localStorage, offline manifest,
         IndexedDB and access Web APIs for more options.

  Responsive web design for adapting to varying resolutions and
                      screen orientation.
2.
Create an app manifest file
Create a file with a .webapp extension
{
  "version": "1.0",
  "name": "MozillaBall",
  "description": "Exciting Open Web development action!",
  "icons": {
     "16": "/img/icon-16.png",
     "48": "/img/icon-48.png",
     "128": "/img/icon-128.png"
  },
  "developer": {
     "name": "Mozilla Labs",
     "url": "http://mozillalabs.com"
  },
  "installs_allowed_from": ["*"],
  "appcache_path": "/cache.manifest",
  "locales": {
     "es": {
        "description": "¡Acción abierta emocionante del desarrollo del Web!",
        "developer": {
          "url": "http://es.mozillalabs.com/"
        }
     },
     "it": {
        "description": "Azione aperta emozionante di sviluppo di
fotoricettore!",
        "developer": {
          "url": "http://it.mozillalabs.com/"
        }
     }
  },
  "default_locale": "en"
}
MANIFEST CHECKER
   http://appmanifest.org/
Serve with Content-type/MIME type:

application/x-web-app-manifest+json
Apache - in mime.types:

application/x-web-app-manifest+json webapp



Apache - in .htaccess:

AddType application/x-web-app-manifest
+json webapp



NGinx - in mime.types:

types {
  text/html   html htm shtml;
  text/css    css;
  text/xml    xml;
  application/x-web-app-manifest+json
webapp;
}
IIS:

In IIS Manager, right-click the local
computer, and click Properties.

Click the MIME Types button.

Click New.

In the Extension box, type the file name
extension.

In the MIME type box, type a description
that exactly matches the file type defined
on the computer.

Click OK.
curl -I http://mozillalabs.com/manifest.webapp
3.
Publish/install the app
Firefox Marketplace
https://marketplace.firefox.com/
https://marketplace.firefox.com/developers/
Installing/hosting the app
var request = navigator.mozApps.install(
   "http://mozillalabs.com/MozillaBall.webapp",
   {
     user_id: "some_user"
   }
);

request.onsuccess = function() {
  // Success! Notification, launch page etc
}

request.onerror = function() {
  // Failed. this.error.name has details
}
var request = navigator.mozApps.installPackage(
   "http://mozillalabs.com/manifest.webapp"
);

request.onsuccess = function() {
  // Success!
}

request.onerror = function() {
  // Failed.
}
Packaged vs. Hosted Apps
A packaged app is an Open Web App that has all of its resources
(HTML, CSS, JavaScript, app manifest, and so on) contained in a zip
       file, instead of having its resources on a Web server.

A packaged app is simply a zip file with the app manifest in its root
    directory. The manifest must be named manifest.webapp.
Can be privileged apps with more API access than hosted apps

Special protocol internal to the zip file: app://<uuid>

Manifest file must be named manifest.webapp

Resources are accessed from the zip file, which is stored on the device where the
app is installed

Installed with a different mozApps API function: installPackage()

Enforce a specific Content Security Policy for all application content

Can embed remote content in iframes, but that content will not have access to
privileged APIs nor will it have the default CSP applied to it

Have an update process for getting new versions of the app to users. Hosted
apps do not need this process.
https://developer.mozilla.org/docs/Apps/
          For_Web_developers
WebAPIs
The Mozilla WebAPI team is pushing the
envelope of the web to include --- and in places
exceed --- the capabilities of competing stacks.
https://wiki.mozilla.org/WebAPI
Security Levels
Granted by default                        Granted by authorized store

Safe web APIs that don’t expose privacy   Privacy and security sensitive APIs such
sensitive data. WebGL, fullscreen,        as Contacts API
audio, etc.
                                          Verified by signature
Granted by user
                                          Highly privileged APIs such as radio
location, camera, file system access       access (dialer)

Granted when installed

No quota for localStorage, IndexedDB,
offline cache
Web Content                        Certified Web App

Regular web content                Device-critical applications

Installed Web App

A regular web app

Privileged Web App

More access, more responsibility
https://wiki.mozilla.org/
WebAPI#Planned_for_initial_release_of_B2G_.
          28aka_Basecamp.29
"permissions": {
    "contacts": {
        "description": "Required for autocompletion in the share screen",
        "access": "readcreate"
    },
    "alarms": {
        "description": "Required to schedule notifications"
    }
}
AlarmAPI                                      FMRadio

BrowserAPI                                    geolocation

Contacts                                      systemXHR

device-storage:music/device-storage:videos/   TCP Socket API
device-storage:pictures/device-
storage:sdcard:                               wake-lock-screen

   Add, read, or modify files stored at a
   central location on the device. access
   property required: one of readonly,
   readwrite, readcreate, or createonly.




                    NEED PERMISSION
Vibration API (W3C)             Web Activities
Screen Orientation              Push Notifications API
Geolocation API                 WebFM API
Mouse Lock API (W3C)            WebPayment
Open WebApps                    IndexedDB (W3C)
Network Information API (W3C)   Ambient light sensor
Battery Status API (W3C)        Proximity sensor
Alarm API                       Notification




                      REGULAR APIS
BATTERY STATUS
API
var battery = navigator.battery;
if (battery) {
        var batteryLevel = Math.round(battery.level * 100) + "%",
            charging = (battery.charging)? "" : "not ",
            chargingTime = parseInt(battery.chargingTime / 60, 10,
            dischargingTime = parseInt(battery.dischargingTime / 60, 10);

    // Set events
    battery.addEventListener("levelchange", setStatus, false);
    battery.addEventListener("chargingchange", setStatus, false);
    battery.addEventListener("chargingtimechange", setStatus, false);
    battery.addEventListener("dischargingtimechange", setStatus, false);
}
NOTIFICATION
var notification = navigator.mozNotification;
notification.createNotification(
    "See this",
    "This is a notification",
    iconURL
);
SCREEN
ORIENTATION API
// Portrait mode:
screen.mozLockOrientation("portrait");

/*
     Possible values:
         "landscape"
         "portrait"
         "landscape-primary"
         "landscape-secondary"
         "portrait-primary"
         "portrait-secondary"
*/
WEB ACTIVITIES
{
    "activities": {
        "share": {
            "filters": {
                type: ["image/png", "image/gif"],
            }
            "href": "sharing.html",
            "disposition": "window"
        }
    }
}
var activity = new MozActivity({
    name: "view",
    data: {
        type: "image/png",
        url: ...
    }
});

activity.onsuccess = function () {
    console.log("Showing the image!");
};

activity.onerror = function () {
    console.log("Can't view the image!");
};
var register = navigator.mozRegisterActivityHandler({
    name: "view",
    disposition: "inline",
    filters: {
        type: "image/png"
    }
});

register.onerror = function () {
    console.log("Failed to register activity");
}
navigator.mozSetMessageHandler("activity", function (a) {
    var img = getImageObject();
    img.src = a.source.url;
    // Call a.postResult() or a.postError() if
    // the activity should return a value
});
VIBRATION API
// Vibrate for one second
navigator.vibrate(1000);

// Vibration pattern [vibrationTime, pause,…]
navigator.vibrate([200, 100, 200, 100]);

// Vibrate for 5 seconds
navigator.vibrate(5000);

// Turn off vibration
navigator.vibrate(0);
WEB PAYMENTS
var pay = navigator.mozPay(paymentToken);
pay.onsuccess = function (event) {
    // Weee! Money!
};
NETWORK
INFORMATION API
var connection = window.navigator.mozConnection,
    online = connection.bandwidth > 0,
    metered = connection.metered;
ALARM API
var alarmId1,
    request = navigator.mozAlarms.add(
        new Date("May 15, 2012 16:20:00"),
        "honorTimezone",
        {
            mydata: "my event"
        }
    );

request.onsuccess = function (event) {
    alarmId1 = event.target.result;
};

request.onerror = function (event) {
    console.log(event.target.error.name);
};
var request = navigator.mozAlarms.getAll();

request.onsuccess = function (event) {
    console.log(JSON.stringify(event.target.result));
};

request.onerror = function (event) {
    console.log(event.target.error.name);
};
navigator.mozAlarms.remove(alarmId1);
navigator.mozSetMessageHandler(
    "alarm",
    function (message) {
        // Note: message has to be set in the manifest file
        console.log("Alarm fired: " + JSON.stringify(message));
    }
);
{
    "messages": ["alarm"]
}
DEVICEPROXIMITY
window.addEventListener("deviceproximity", function (event) {
    // Current device proximity, in centimeters
    console.log(event.value);

      // The maximum sensing distance the sensor is
      // able to report, in centimeters
      console.log(event.max);

      // The minimum sensing distance the sensor is
      // able to report, in centimeters
      console.log(event.min);
});
AMBIENT LIGHT
EVENTS
window.addEventListener("devicelight", function (event) {
    // The level of the ambient light in lux
    console.log(event.value);
});
window.addEventListener("lightlevel", function (event) {
    // Possible values: "normal", "bright", "dim"
    console.log(event.value);
});
window.addEventListener("devicelight", function (event) {
    // The lux values for "dim" typically begin below 50,
    // and the values for "bright" begin above 10000
    console.log(event.value);
});
Device Storage API
Browser API
TCP Socket API
Contacts API
systemXHR




                 PRIVILEGED APIS
DEVICE STORAGE
API
var deviceStorage = navigator.getDeviceStorage("videos");
// "external", "shared", or "default".
deviceStorage.type;

// Add a file - returns DOMRequest with file name
deviceStorage.add(blob);

// Same as .add, with provided name
deviceStorage.addNamed(blob, name);

// Returns DOMRequest/non-editable File object
deviceStorage.get(name);

// Returns editable FileHandle object
deviceStorage.getEditable(name);

// Returns DOMRequest with success or failure
deviceStorage.delete(name);

// Enumerates files
deviceStorage.enumerate([directory]);

// Enumerates files as FileHandles
deviceStorage.enumerateEditable([directory]);
var storage = navigator.getDeviceStorage("videos"),
    cursor = storage.enumerate();

cursor.onerror = function() {
   console.error("Error in DeviceStorage.enumerate()", cursor.error.name);
};

cursor.onsuccess = function() {
    if (!cursor.result)
        return;

    var file = cursor.result;

    // If this isn't a video, skip it
    if (file.type.substring(0, 6) !== "video/") {
        cursor.continue();
        return;
    }

    // If it isn't playable, skip it
    var testplayer = document.createElement("video");
    if (!testplayer.canPlayType(file.type)) {
        cursor.continue();
        return;
    }
}
CONTACTS API
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")
};
WebTelephony                    WebBluetooth
WebSMS                          Permissions API
Idle API                        Network Stats API
Settings API                    Camera API
Power Management API            Time/Clock API
Mobile Connection API           Attention screen
WiFi Information API            Voicemail



                        CERTIFIED APIS
WEBTELEPHONY
// Telephony object
var tel = navigator.mozTelephony;

// Check if the phone is muted (read/write property)
console.log(tel.muted);

// Check if the speaker is enabled (read/write property)
console.log(tel.speakerEnabled);
// Place a call
var cal = tel.dial(“123456789”);
// Events for that call
call.onstatechange = function (event) {
    /*
        Possible values for state:
        "dialing", "ringing", "busy", "connecting", "connected",
        "disconnecting", "disconnected", "incoming"
    */
    console.log(event.state);
};

// Above options as direct events
call.onconnected = function () {
    // Call was connected
};

call.ondisconnected = function () {
    // Call was disconnected
};
// Receiving a call
tel.onincoming = function (event) {
    var incomingCall = event.call;

     // Get the number of the incoming call
     console.log(incomingCall.number);

     // Answer the call
     incomingCall.answer();
};

// Disconnect a call
call.hangUp();



// Iterating over calls, and taking action depending on their
changed status
tel.oncallschanged = function (event) {
    tel.calls.forEach(function (call) {
        // Log the state of each call
        console.log(call.state);
    });
};
WEBSMS
// SMS object
var sms = navigator.mozSMS;

// Send a message
sms.send("123456789", "Hello world!");
// Recieve a message
sms.onreceived = function (event) {
    // Read message
    console.log(event.message);
};
SETTINGS API
var settings = navigator.mozSettings;
settings.getLock().set({"background": "pretty.png"});
Future APIs
Resource lock API         Spellcheck API
UDP Datagram Socket API   LogAPI
Peer to Peer API          Keyboard/IME API
WebNFC                    WebRTC
WebUSB                    FileHandle API
HTTP-cache API            Sync API
Calendar API
Web Apps from Mozilla
Dialer               Alarm Clock

Contacts             Camera

Settings             Notes

SMS                  First Run Experience

Web browser          Notifications

Gallery              Home Screen

Video Player         Mozilla Marketplace

Music Player         System Updater

E-mail (POP, IMAP)   Localization Support

Calendar
Getting help
irc://irc.mozilla.org/
  #openwebapps
https://lists.mozilla.org/listinfo/dev-webapps
Trying things out
Robert Nyman
robertnyman.com
robert@mozilla.com
Mozilla

   @robertnyman

More Related Content

What's hot

Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Adam Lu
 
Web versus Native: round 1!
Web versus Native: round 1!Web versus Native: round 1!
Web versus Native: round 1!Chris Mills
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the futureChris Mills
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web AppsFITC
 
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27Frédéric Harper
 
Building Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSBuilding Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSFITC
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsJim Jeffers
 
APIs for modern web apps
APIs for modern web appsAPIs for modern web apps
APIs for modern web appsChris Mills
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineAlexander Zamkovyi
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortalJennifer Bourey
 
Angular vs React for Web Application Development
Angular vs React for Web Application DevelopmentAngular vs React for Web Application Development
Angular vs React for Web Application DevelopmentFITC
 
Rails for Mobile Devices @ Conferencia Rails 2011
Rails for Mobile Devices @ Conferencia Rails 2011Rails for Mobile Devices @ Conferencia Rails 2011
Rails for Mobile Devices @ Conferencia Rails 2011Alberto Perdomo
 
Firefox OS workshop, Colombia
Firefox OS workshop, ColombiaFirefox OS workshop, Colombia
Firefox OS workshop, ColombiaRobert Nyman
 
Crossing the Boundaries of Web Applications with OpenSocial
Crossing the Boundaries of Web Applications with OpenSocialCrossing the Boundaries of Web Applications with OpenSocial
Crossing the Boundaries of Web Applications with OpenSocialBastian Hofmann
 
PWA Roadshow Korea - Service Worker
PWA Roadshow Korea - Service WorkerPWA Roadshow Korea - Service Worker
PWA Roadshow Korea - Service Workerjungkees
 
Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
 Cutting edge HTML5 API you can use today (by Bohdan Rusinka) Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
Cutting edge HTML5 API you can use today (by Bohdan Rusinka)Binary Studio
 

What's hot (18)

Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)
 
Web versus Native: round 1!
Web versus Native: round 1!Web versus Native: round 1!
Web versus Native: round 1!
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the future
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
 
Building Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSBuilding Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOS
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
 
APIs for modern web apps
APIs for modern web appsAPIs for modern web apps
APIs for modern web apps
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App Engine
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortal
 
Angular vs React for Web Application Development
Angular vs React for Web Application DevelopmentAngular vs React for Web Application Development
Angular vs React for Web Application Development
 
XPages Mobile, #dd13
XPages Mobile, #dd13XPages Mobile, #dd13
XPages Mobile, #dd13
 
Rails for Mobile Devices @ Conferencia Rails 2011
Rails for Mobile Devices @ Conferencia Rails 2011Rails for Mobile Devices @ Conferencia Rails 2011
Rails for Mobile Devices @ Conferencia Rails 2011
 
Firefox OS workshop, Colombia
Firefox OS workshop, ColombiaFirefox OS workshop, Colombia
Firefox OS workshop, Colombia
 
Crossing the Boundaries of Web Applications with OpenSocial
Crossing the Boundaries of Web Applications with OpenSocialCrossing the Boundaries of Web Applications with OpenSocial
Crossing the Boundaries of Web Applications with OpenSocial
 
PWA Roadshow Korea - Service Worker
PWA Roadshow Korea - Service WorkerPWA Roadshow Korea - Service Worker
PWA Roadshow Korea - Service Worker
 
Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
 Cutting edge HTML5 API you can use today (by Bohdan Rusinka) Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
Cutting edge HTML5 API you can use today (by Bohdan Rusinka)
 

Similar to Web APIs & Apps - Mozilla

WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonRobert Nyman
 
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W... 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...Robert Nyman
 
WebAPIs & WebRTC - Spotify/sthlm.js
WebAPIs & WebRTC - Spotify/sthlm.jsWebAPIs & WebRTC - Spotify/sthlm.js
WebAPIs & WebRTC - Spotify/sthlm.jsRobert Nyman
 
Mozilla, Firefox OS and the Open Web
Mozilla, Firefox OS and the Open WebMozilla, Firefox OS and the Open Web
Mozilla, Firefox OS and the Open WebRobert Nyman
 
Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaChristian Heilmann
 
Firefox os-introduction
Firefox os-introductionFirefox os-introduction
Firefox os-introductionzsoltlengyelit
 
(Christian heilman) firefox
(Christian heilman) firefox(Christian heilman) firefox
(Christian heilman) firefoxNAVER D2
 
Mozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJSMozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJSRobert Nyman
 
JavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the PlatformJavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the PlatformRobert Nyman
 
Øredev2013 - FirefoxOS - the platform HTML5 deserves
Øredev2013 - FirefoxOS - the platform HTML5 deservesØredev2013 - FirefoxOS - the platform HTML5 deserves
Øredev2013 - FirefoxOS - the platform HTML5 deservesChristian Heilmann
 
Empowering the “Mobile Web” with Chris Mills
Empowering the “Mobile Web” with Chris MillsEmpowering the “Mobile Web” with Chris Mills
Empowering the “Mobile Web” with Chris MillsFITC
 
Empowering the Mobile Web - Mills
Empowering the Mobile Web - MillsEmpowering the Mobile Web - Mills
Empowering the Mobile Web - MillsCodemotion
 
Firefox OS, the Open Web & WebAPIs - Geek Meet Västerås
Firefox OS, the Open Web & WebAPIs - Geek Meet VästeråsFirefox OS, the Open Web & WebAPIs - Geek Meet Västerås
Firefox OS, the Open Web & WebAPIs - Geek Meet VästeråsRobert Nyman
 
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San FranciscoFirefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San FranciscoRobert Nyman
 
Firefox OS workshop, JSFoo, India
Firefox OS workshop, JSFoo, IndiaFirefox OS workshop, JSFoo, India
Firefox OS workshop, JSFoo, IndiaRobert Nyman
 
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at GoogleWebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at GoogleRobert Nyman
 
Firefox OS Introduction at Bontouch
Firefox OS Introduction at BontouchFirefox OS Introduction at Bontouch
Firefox OS Introduction at BontouchRobert Nyman
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOSfpatton
 
Web app and more
Web app and moreWeb app and more
Web app and morefaming su
 

Similar to Web APIs & Apps - Mozilla (20)

WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
 
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W... 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 
WebAPIs & WebRTC - Spotify/sthlm.js
WebAPIs & WebRTC - Spotify/sthlm.jsWebAPIs & WebRTC - Spotify/sthlm.js
WebAPIs & WebRTC - Spotify/sthlm.js
 
Mozilla, Firefox OS and the Open Web
Mozilla, Firefox OS and the Open WebMozilla, Firefox OS and the Open Web
Mozilla, Firefox OS and the Open Web
 
Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World Romania
 
Firefox os-introduction
Firefox os-introductionFirefox os-introduction
Firefox os-introduction
 
(Christian heilman) firefox
(Christian heilman) firefox(Christian heilman) firefox
(Christian heilman) firefox
 
Mozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJSMozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJS
 
JavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the PlatformJavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the Platform
 
Øredev2013 - FirefoxOS - the platform HTML5 deserves
Øredev2013 - FirefoxOS - the platform HTML5 deservesØredev2013 - FirefoxOS - the platform HTML5 deserves
Øredev2013 - FirefoxOS - the platform HTML5 deserves
 
Empowering the “Mobile Web” with Chris Mills
Empowering the “Mobile Web” with Chris MillsEmpowering the “Mobile Web” with Chris Mills
Empowering the “Mobile Web” with Chris Mills
 
Empowering the Mobile Web - Mills
Empowering the Mobile Web - MillsEmpowering the Mobile Web - Mills
Empowering the Mobile Web - Mills
 
Firefox OS, the Open Web & WebAPIs - Geek Meet Västerås
Firefox OS, the Open Web & WebAPIs - Geek Meet VästeråsFirefox OS, the Open Web & WebAPIs - Geek Meet Västerås
Firefox OS, the Open Web & WebAPIs - Geek Meet Västerås
 
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San FranciscoFirefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
Firefox OS, the Open Web & WebAPIs - HTML5DevConf, San Francisco
 
Firefox OS workshop, JSFoo, India
Firefox OS workshop, JSFoo, IndiaFirefox OS workshop, JSFoo, India
Firefox OS workshop, JSFoo, India
 
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at GoogleWebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
 
Firefox OS Introduction at Bontouch
Firefox OS Introduction at BontouchFirefox OS Introduction at Bontouch
Firefox OS Introduction at Bontouch
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
 
Always on! Or not?
Always on! Or not?Always on! Or not?
Always on! Or not?
 
Web app and more
Web app and moreWeb app and more
Web app and more
 

More from Robert Nyman

Have you tried listening?
Have you tried listening?Have you tried listening?
Have you tried listening?Robert Nyman
 
Building for Your Next Billion - Google I/O 2017
Building for Your Next Billion - Google I/O 2017Building for Your Next Billion - Google I/O 2017
Building for Your Next Billion - Google I/O 2017Robert Nyman
 
Introduction to Google Daydream
Introduction to Google DaydreamIntroduction to Google Daydream
Introduction to Google DaydreamRobert Nyman
 
Predictability for the Web
Predictability for the WebPredictability for the Web
Predictability for the WebRobert Nyman
 
The Future of Progressive Web Apps - View Source conference, Berlin 2016
The Future of Progressive Web Apps - View Source conference, Berlin 2016The Future of Progressive Web Apps - View Source conference, Berlin 2016
The Future of Progressive Web Apps - View Source conference, Berlin 2016Robert Nyman
 
The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016Robert Nyman
 
The Future of Progressive Web Apps - Google for Indonesia
The Future of Progressive Web Apps - Google for IndonesiaThe Future of Progressive Web Apps - Google for Indonesia
The Future of Progressive Web Apps - Google for IndonesiaRobert Nyman
 
Google tech & products
Google tech & productsGoogle tech & products
Google tech & productsRobert Nyman
 
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...Robert Nyman
 
Progressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
Progressive Web Apps keynote, Google Developer Summit, Tokyo, JapanProgressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
Progressive Web Apps keynote, Google Developer Summit, Tokyo, JapanRobert Nyman
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...Robert Nyman
 
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...Robert Nyman
 
The web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - IstanbulThe web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - IstanbulRobert Nyman
 
The web - What it has, what it lacks and where it must go
The web - What it has, what it lacks and where it must goThe web - What it has, what it lacks and where it must go
The web - What it has, what it lacks and where it must goRobert Nyman
 
Google, the future and possibilities
Google, the future and possibilitiesGoogle, the future and possibilities
Google, the future and possibilitiesRobert Nyman
 
Developer Relations in the Nordics
Developer Relations in the NordicsDeveloper Relations in the Nordics
Developer Relations in the NordicsRobert Nyman
 
What is Developer Relations?
What is Developer Relations?What is Developer Relations?
What is Developer Relations?Robert Nyman
 
Android TV Introduction - Stockholm Android TV meetup
Android TV Introduction - Stockholm Android TV meetupAndroid TV Introduction - Stockholm Android TV meetup
Android TV Introduction - Stockholm Android TV meetupRobert Nyman
 
New improvements for web developers - frontend.fi, Helsinki
New improvements for web developers - frontend.fi, HelsinkiNew improvements for web developers - frontend.fi, Helsinki
New improvements for web developers - frontend.fi, HelsinkiRobert Nyman
 
Mobile phone trends, user data & developer climate - frontend.fi, Helsinki
Mobile phone trends, user data & developer climate - frontend.fi, HelsinkiMobile phone trends, user data & developer climate - frontend.fi, Helsinki
Mobile phone trends, user data & developer climate - frontend.fi, HelsinkiRobert Nyman
 

More from Robert Nyman (20)

Have you tried listening?
Have you tried listening?Have you tried listening?
Have you tried listening?
 
Building for Your Next Billion - Google I/O 2017
Building for Your Next Billion - Google I/O 2017Building for Your Next Billion - Google I/O 2017
Building for Your Next Billion - Google I/O 2017
 
Introduction to Google Daydream
Introduction to Google DaydreamIntroduction to Google Daydream
Introduction to Google Daydream
 
Predictability for the Web
Predictability for the WebPredictability for the Web
Predictability for the Web
 
The Future of Progressive Web Apps - View Source conference, Berlin 2016
The Future of Progressive Web Apps - View Source conference, Berlin 2016The Future of Progressive Web Apps - View Source conference, Berlin 2016
The Future of Progressive Web Apps - View Source conference, Berlin 2016
 
The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016
 
The Future of Progressive Web Apps - Google for Indonesia
The Future of Progressive Web Apps - Google for IndonesiaThe Future of Progressive Web Apps - Google for Indonesia
The Future of Progressive Web Apps - Google for Indonesia
 
Google tech & products
Google tech & productsGoogle tech & products
Google tech & products
 
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
 
Progressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
Progressive Web Apps keynote, Google Developer Summit, Tokyo, JapanProgressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
Progressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...
 
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
 
The web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - IstanbulThe web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - Istanbul
 
The web - What it has, what it lacks and where it must go
The web - What it has, what it lacks and where it must goThe web - What it has, what it lacks and where it must go
The web - What it has, what it lacks and where it must go
 
Google, the future and possibilities
Google, the future and possibilitiesGoogle, the future and possibilities
Google, the future and possibilities
 
Developer Relations in the Nordics
Developer Relations in the NordicsDeveloper Relations in the Nordics
Developer Relations in the Nordics
 
What is Developer Relations?
What is Developer Relations?What is Developer Relations?
What is Developer Relations?
 
Android TV Introduction - Stockholm Android TV meetup
Android TV Introduction - Stockholm Android TV meetupAndroid TV Introduction - Stockholm Android TV meetup
Android TV Introduction - Stockholm Android TV meetup
 
New improvements for web developers - frontend.fi, Helsinki
New improvements for web developers - frontend.fi, HelsinkiNew improvements for web developers - frontend.fi, Helsinki
New improvements for web developers - frontend.fi, Helsinki
 
Mobile phone trends, user data & developer climate - frontend.fi, Helsinki
Mobile phone trends, user data & developer climate - frontend.fi, HelsinkiMobile phone trends, user data & developer climate - frontend.fi, Helsinki
Mobile phone trends, user data & developer climate - frontend.fi, Helsinki
 

Recently uploaded

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Recently uploaded (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

Web APIs & Apps - Mozilla

  • 1. FIREFOX OS WebAPIs & Apps
  • 2.
  • 3.
  • 4.
  • 6.
  • 7.
  • 8. Using HTML5, CSS and JavaScript together with a number of APIs to build apps and customize the UI.
  • 9.
  • 10.
  • 13. Web apps are apps built using standard Web technologies. They work in any modern Web browser. The Open Web apps project proposes some small additions to existing sites to turn them into apps. These apps run on desktop browsers and mobile devices.
  • 15.
  • 17.
  • 18. Develop Web App using 1. HTML5, CSS, & Javascript 2. Create an app manifest file 3. Publish/install the app
  • 19. 1. Develop Web App using HTML5, CSS & JavaScript
  • 20. Reuse any existing web site/app or develop from scratch with open web standards. Utilize HTML5 features such as localStorage, offline manifest, IndexedDB and access Web APIs for more options. Responsive web design for adapting to varying resolutions and screen orientation.
  • 21.
  • 22. 2. Create an app manifest file
  • 23. Create a file with a .webapp extension
  • 24. { "version": "1.0", "name": "MozillaBall", "description": "Exciting Open Web development action!", "icons": { "16": "/img/icon-16.png", "48": "/img/icon-48.png", "128": "/img/icon-128.png" }, "developer": { "name": "Mozilla Labs", "url": "http://mozillalabs.com" }, "installs_allowed_from": ["*"], "appcache_path": "/cache.manifest", "locales": { "es": { "description": "¡Acción abierta emocionante del desarrollo del Web!", "developer": { "url": "http://es.mozillalabs.com/" } }, "it": { "description": "Azione aperta emozionante di sviluppo di fotoricettore!", "developer": { "url": "http://it.mozillalabs.com/" } } }, "default_locale": "en" }
  • 25. MANIFEST CHECKER http://appmanifest.org/
  • 26. Serve with Content-type/MIME type: application/x-web-app-manifest+json
  • 27. Apache - in mime.types: application/x-web-app-manifest+json webapp Apache - in .htaccess: AddType application/x-web-app-manifest +json webapp NGinx - in mime.types: types { text/html html htm shtml; text/css css; text/xml xml; application/x-web-app-manifest+json webapp; }
  • 28. IIS: In IIS Manager, right-click the local computer, and click Properties. Click the MIME Types button. Click New. In the Extension box, type the file name extension. In the MIME type box, type a description that exactly matches the file type defined on the computer. Click OK.
  • 35. var request = navigator.mozApps.install( "http://mozillalabs.com/MozillaBall.webapp", { user_id: "some_user" } ); request.onsuccess = function() { // Success! Notification, launch page etc } request.onerror = function() { // Failed. this.error.name has details }
  • 36. var request = navigator.mozApps.installPackage( "http://mozillalabs.com/manifest.webapp" ); request.onsuccess = function() { // Success! } request.onerror = function() { // Failed. }
  • 38. A packaged app is an Open Web App that has all of its resources (HTML, CSS, JavaScript, app manifest, and so on) contained in a zip file, instead of having its resources on a Web server. A packaged app is simply a zip file with the app manifest in its root directory. The manifest must be named manifest.webapp.
  • 39. Can be privileged apps with more API access than hosted apps Special protocol internal to the zip file: app://<uuid> Manifest file must be named manifest.webapp Resources are accessed from the zip file, which is stored on the device where the app is installed Installed with a different mozApps API function: installPackage() Enforce a specific Content Security Policy for all application content Can embed remote content in iframes, but that content will not have access to privileged APIs nor will it have the default CSP applied to it Have an update process for getting new versions of the app to users. Hosted apps do not need this process.
  • 42. The Mozilla WebAPI team is pushing the envelope of the web to include --- and in places exceed --- the capabilities of competing stacks.
  • 45. Granted by default Granted by authorized store Safe web APIs that don’t expose privacy Privacy and security sensitive APIs such sensitive data. WebGL, fullscreen, as Contacts API audio, etc. Verified by signature Granted by user Highly privileged APIs such as radio location, camera, file system access access (dialer) Granted when installed No quota for localStorage, IndexedDB, offline cache
  • 46. Web Content Certified Web App Regular web content Device-critical applications Installed Web App A regular web app Privileged Web App More access, more responsibility
  • 48. "permissions": { "contacts": { "description": "Required for autocompletion in the share screen", "access": "readcreate" }, "alarms": { "description": "Required to schedule notifications" } }
  • 49. AlarmAPI FMRadio BrowserAPI geolocation Contacts systemXHR device-storage:music/device-storage:videos/ TCP Socket API device-storage:pictures/device- storage:sdcard: wake-lock-screen Add, read, or modify files stored at a central location on the device. access property required: one of readonly, readwrite, readcreate, or createonly. NEED PERMISSION
  • 50.
  • 51. Vibration API (W3C) Web Activities Screen Orientation Push Notifications API Geolocation API WebFM API Mouse Lock API (W3C) WebPayment Open WebApps IndexedDB (W3C) Network Information API (W3C) Ambient light sensor Battery Status API (W3C) Proximity sensor Alarm API Notification REGULAR APIS
  • 53. var battery = navigator.battery; if (battery) { var batteryLevel = Math.round(battery.level * 100) + "%", charging = (battery.charging)? "" : "not ", chargingTime = parseInt(battery.chargingTime / 60, 10, dischargingTime = parseInt(battery.dischargingTime / 60, 10); // Set events battery.addEventListener("levelchange", setStatus, false); battery.addEventListener("chargingchange", setStatus, false); battery.addEventListener("chargingtimechange", setStatus, false); battery.addEventListener("dischargingtimechange", setStatus, false); }
  • 55. var notification = navigator.mozNotification; notification.createNotification( "See this", "This is a notification", iconURL );
  • 57. // Portrait mode: screen.mozLockOrientation("portrait"); /* Possible values: "landscape" "portrait" "landscape-primary" "landscape-secondary" "portrait-primary" "portrait-secondary" */
  • 59. { "activities": { "share": { "filters": { type: ["image/png", "image/gif"], } "href": "sharing.html", "disposition": "window" } } }
  • 60. var activity = new MozActivity({ name: "view", data: { type: "image/png", url: ... } }); activity.onsuccess = function () { console.log("Showing the image!"); }; activity.onerror = function () { console.log("Can't view the image!"); };
  • 61. var register = navigator.mozRegisterActivityHandler({ name: "view", disposition: "inline", filters: { type: "image/png" } }); register.onerror = function () { console.log("Failed to register activity"); }
  • 62. navigator.mozSetMessageHandler("activity", function (a) { var img = getImageObject(); img.src = a.source.url; // Call a.postResult() or a.postError() if // the activity should return a value });
  • 64. // Vibrate for one second navigator.vibrate(1000); // Vibration pattern [vibrationTime, pause,…] navigator.vibrate([200, 100, 200, 100]); // Vibrate for 5 seconds navigator.vibrate(5000); // Turn off vibration navigator.vibrate(0);
  • 66. var pay = navigator.mozPay(paymentToken); pay.onsuccess = function (event) { // Weee! Money! };
  • 67.
  • 69. var connection = window.navigator.mozConnection, online = connection.bandwidth > 0, metered = connection.metered;
  • 71. var alarmId1, request = navigator.mozAlarms.add( new Date("May 15, 2012 16:20:00"), "honorTimezone", { mydata: "my event" } ); request.onsuccess = function (event) { alarmId1 = event.target.result; }; request.onerror = function (event) { console.log(event.target.error.name); };
  • 72. var request = navigator.mozAlarms.getAll(); request.onsuccess = function (event) { console.log(JSON.stringify(event.target.result)); }; request.onerror = function (event) { console.log(event.target.error.name); };
  • 74. navigator.mozSetMessageHandler( "alarm", function (message) { // Note: message has to be set in the manifest file console.log("Alarm fired: " + JSON.stringify(message)); } );
  • 75. { "messages": ["alarm"] }
  • 77. window.addEventListener("deviceproximity", function (event) { // Current device proximity, in centimeters console.log(event.value); // The maximum sensing distance the sensor is // able to report, in centimeters console.log(event.max); // The minimum sensing distance the sensor is // able to report, in centimeters console.log(event.min); });
  • 79. window.addEventListener("devicelight", function (event) { // The level of the ambient light in lux console.log(event.value); });
  • 80. window.addEventListener("lightlevel", function (event) { // Possible values: "normal", "bright", "dim" console.log(event.value); });
  • 81. window.addEventListener("devicelight", function (event) { // The lux values for "dim" typically begin below 50, // and the values for "bright" begin above 10000 console.log(event.value); });
  • 82. Device Storage API Browser API TCP Socket API Contacts API systemXHR PRIVILEGED APIS
  • 84. var deviceStorage = navigator.getDeviceStorage("videos");
  • 85. // "external", "shared", or "default". deviceStorage.type; // Add a file - returns DOMRequest with file name deviceStorage.add(blob); // Same as .add, with provided name deviceStorage.addNamed(blob, name); // Returns DOMRequest/non-editable File object deviceStorage.get(name); // Returns editable FileHandle object deviceStorage.getEditable(name); // Returns DOMRequest with success or failure deviceStorage.delete(name); // Enumerates files deviceStorage.enumerate([directory]); // Enumerates files as FileHandles deviceStorage.enumerateEditable([directory]);
  • 86. var storage = navigator.getDeviceStorage("videos"), cursor = storage.enumerate(); cursor.onerror = function() { console.error("Error in DeviceStorage.enumerate()", cursor.error.name); }; cursor.onsuccess = function() { if (!cursor.result) return; var file = cursor.result; // If this isn't a video, skip it if (file.type.substring(0, 6) !== "video/") { cursor.continue(); return; } // If it isn't playable, skip it var testplayer = document.createElement("video"); if (!testplayer.canPlayType(file.type)) { cursor.continue(); return; } }
  • 88. 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") };
  • 89. WebTelephony WebBluetooth WebSMS Permissions API Idle API Network Stats API Settings API Camera API Power Management API Time/Clock API Mobile Connection API Attention screen WiFi Information API Voicemail CERTIFIED APIS
  • 91. // Telephony object var tel = navigator.mozTelephony; // Check if the phone is muted (read/write property) console.log(tel.muted); // Check if the speaker is enabled (read/write property) console.log(tel.speakerEnabled);
  • 92. // Place a call var cal = tel.dial(“123456789”);
  • 93. // Events for that call call.onstatechange = function (event) { /* Possible values for state: "dialing", "ringing", "busy", "connecting", "connected", "disconnecting", "disconnected", "incoming" */ console.log(event.state); }; // Above options as direct events call.onconnected = function () { // Call was connected }; call.ondisconnected = function () { // Call was disconnected };
  • 94. // Receiving a call tel.onincoming = function (event) { var incomingCall = event.call; // Get the number of the incoming call console.log(incomingCall.number); // Answer the call incomingCall.answer(); }; // Disconnect a call call.hangUp(); // Iterating over calls, and taking action depending on their changed status tel.oncallschanged = function (event) { tel.calls.forEach(function (call) { // Log the state of each call console.log(call.state); }); };
  • 96. // SMS object var sms = navigator.mozSMS; // Send a message sms.send("123456789", "Hello world!");
  • 97. // Recieve a message sms.onreceived = function (event) { // Read message console.log(event.message); };
  • 99. var settings = navigator.mozSettings; settings.getLock().set({"background": "pretty.png"});
  • 100.
  • 102.
  • 103. Resource lock API Spellcheck API UDP Datagram Socket API LogAPI Peer to Peer API Keyboard/IME API WebNFC WebRTC WebUSB FileHandle API HTTP-cache API Sync API Calendar API
  • 104. Web Apps from Mozilla
  • 105.
  • 106. Dialer Alarm Clock Contacts Camera Settings Notes SMS First Run Experience Web browser Notifications Gallery Home Screen Video Player Mozilla Marketplace Music Player System Updater E-mail (POP, IMAP) Localization Support Calendar
  • 107.
  • 109.
  • 113.
  • 114.
  • 115.