Introduction to WebAPI- FirefoxOS

19
Introduction to WebAPI

Transcript of Introduction to WebAPI- FirefoxOS

Introduction to WebAPI

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.

No longer need to learn anddevelop against platform-specific native APIs.

GONK

Lower level operating system, consisting of a Linux kernel and HAL (Hardware Abstraction Layer).

GECKO

The application runtime. The rendering engine inFirefox for HTML5, CSS & JavaScript. Implements 

a number of APIs.

GAIA

GAIA ux concept of B2G

WHAT IS API??

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.

Two Kinds Of API Privileged API

Alarm Camera

Certified API

Cell broadcast Power Management

BATTERY

//First, get the objectvar battery = navigator.mozBattery;

//Check the current levelvar batteryLevel = battery.level * 100 + "%";

//Listen to eventsbattery.addEventLister("levelchange", setStatus, false); battery.addEventLister("chargingchange", setStatus, false);

CALLING AND SMS

MANIFEST

INDEX.HTML

AFTER RUNNING IN SIMULATOR

WHO ARE WE??

Special Thanks To Rabby Vai and Sunnat vai