Introduction to WebAPI- FirefoxOS

  • View

  • Download

Embed Size (px)

Text of Introduction to WebAPI- FirefoxOS

  1. 1. Introduction to WebAPI
  2. 2. The Boot to Gecko project is based entirely on open standards and the source code is open and accessible to all. Where open standards are missing, we're working with standards bodies and other vendors to create them.
  3. 3. No longer need to learn and develop against platform-specific native APIs.
  4. 4. GONK Lower level operating system, consisting of a Linux kernel and HAL (Hardware Abstraction Layer).
  5. 5. GECKO The application runtime. The rendering engine in Firefox for HTML5, CSS & JavaScript. Implements a number of APIs.
  6. 6. GAIA GAIA ux concept of B2G
  7. 7. WHAT IS API??
  8. 8. The three levels of permission, in brief, are: Web apps: These only have a basic level of permissions, and don't have access to privileged or internal APIs. Privileged apps: These have all the permissions of web apps plus more. Hosted apps can't be privileged they must be packaged apps. Internal (certified) apps: These have all the permissions of privileged and web apps plus more. Certified/internal apps can only be installed on a device by Mozilla or a device vendor; not 3rd party developers.
  9. 9. Two Kinds Of API Privileged API Alarm Camera Certified API Cell broadcast Power Management
  10. 10. BATTERY //First, get the object var battery = navigator.mozBattery; //Check the current level var batteryLevel = battery.level * 100 + "%"; //Listen to events battery.addEventLister("levelchange", setStatus, false); battery.addEventLister("chargingchange", setStatus, false);
  12. 12. MANIFEST
  13. 13. INDEX.HTML
  15. 15. WHO ARE WE??
  16. 16. Special Thanks To Rabby Vai and Sunnat vai