WebAPI

From MozillaWiki
Revision as of 23:21, 26 April 2012 by Tantek (talk | contribs) (l CalendarAPI)
Jump to navigation Jump to search

The Mozilla WebAPI team is pushing the envelope of the web to include --- and in places exceed --- the capabilities of competing stacks.

Contributing

WebAPI work is being tracked by Mozilla bug 673923. Find an dependent bug that interests you (and is unassigned), and assign it to yourself.

APIs

Here's a list of the APIs that we're working on. Some of them are done, and some of them we haven't gotten further than acknowledge that we probably need them.

Process

A draft specification and prototype implementation of new Web APIs will be discussed publicly on our mailing list and at our public meetings (see below). Once we have an API that we feel that we are satisfied with, we will submit the new API for standardization to the W3C.

The goal is to standardize all APIs.

Design Principles

Security

Security will be a central aspect of all the APIs that we design. We wouldn't want any random webpage to be able to read the user's contact list, or able to issue arbitrary commands to any USB device which is hooked up to the user's computer.

In some cases the solution will be to simply ask the user, like we do today for Geolocation for example. In other cases, where security implications are scarier or where describing the risk to the user is harder, we'll have to come up with better solutions.

This is an area where we're still doing a lot of research. I really want to emphasize that we don't have all the answers yet, but that we plan on having them before we roll out these APIs to millions of users.

Low Level vs. High Level

One question that often comes up, is should we do low level APIs, like USB access, or high level APIs, like camera access?

In many cases we are going to want to do both high level and low level APIs, with an initial priority on low level. High level APIs will let us create more friendly APIs, which are both easier to use for developers, and better for users since we can provide better security guarantees. However low level APIs will provide support for a wider range of hardware and use cases and will get the browser out of the critical path for innovation.

Meetings

  • Tuesday @ 10:00am Pacific Time
  • Dial-in: Audio-only conference# 254
    • People with Mozilla phones or softphones please dial x4000 Conf# 254
    • US/Toll-free: +1 800 707 2533, (pin 4000) Conf# 254
    • US/California/Mountain View: +1 650 903 0800, x4000 Conf# 254
    • US/California/San Francisco: +1 415 762 5700, x4000 Conf# 254
    • US/Oregon/Portland: +1 971 544 8000, x4000 Conf# 254
    • CA/British Columbia/Vancouver: +1 778 785 1540, x4000 Conf# 254
    • CA/Ontario/Toronto: +1 416 848 3114, x4000 Conf# 254
    • UK/London: +44 (0)207 855 3000, x4000 Conf# 254
    • FR/Paris: +33 1 84 88 37 37, x4000 Conf# 254
    • Gmail Chat (requires Flash and the Google Talk plugin): paste +1 650 903 0800 into the Gmail Chat box that doesn't look like it accepts phone numbers
    • SkypeOut is free if you use the 800 number
  • No vidyo since the phone-vidyo bridge is too unreliable
  • *1 to unmute yourself
  • join irc.mozilla.org #webapi for back channel

Communication

Mailing-list / Newsgroup

You can subscribe to the mailing list here: https://lists.mozilla.org/listinfo/dev-webapi

And the web based API is here: http://groups.google.com/group/mozilla.dev.webapi/topics

The newsgroup lives on the news.mozilla.org server and has the name mozilla.dev.webapi

IRC

Find us on irc.mozilla.org in #webapi. Need help to use Mozilla IRC servers?

See also

Demos

Other efforts

Subpages of WebAPI

API Bugs Description Progress
WebTelephony bug 674726 Allow placing and answering phone calls as well as build in-call UI. Basic functionality done. Some work remaining
Vibration API bug 679966 Control device vibration for things like haptic feedback in games. Not intended to solve things like vibration for notification. Done on B2G and Android. Standard in progress.
WebSMS bug 674725 Send/receive SMS messages as well as manage messages stored on device. Done on Android though might not ship there for security reasons. Mostly done for B2G.
Idle API bug 715041 Get notifications when user is idle. Implementation in progress, almost done.
Screen Orientation bug 720794 bug 740188 bug 673922 Get notification when screen orientation changes as well as control which screen orientation a page/app wants. Implemented!
Settings API bug 678695 Set system-wide configurations that are saved permanently on the device. Implementation done for content, chrome in progress.
Resource lock API bug 697132 Prevent resources from being turned off, for example screen dimming, WiFi turning off, CPU going into sleep mode etc. Complete.
Power Management API bug 708964 Turn on/off screen, cpu, device power, etc. Listen and inspect resource lock events. API design and implementation in progress.
Mobile Connection API bug 729173 Expose signal strength, operator, etc for GSM and other mobile connections. This does not cover WiFi. Complete.
TCP Socket API bug 733573 Low-level TCP socket API. Will also include SSL support. Implementation in progress
UDP Datagram Socket API bug 745283 Low-level UDP API. Planning.
Sensor API bug 697361 Access to device sensors such as accelerometer, magnetic field (compass), proximity, ambient light etc. API design and implementation started.
WiFi Information API Enumerate available WiFi networks, get signal strength and name of currently connected network, etc. API drafted, implementation mostly complete.
Device Storage API bug 717103 Add/Read/Modify files stored on a central location on the device. For example the "pictures" folder on modern desktop platforms or the photo storage in mobile devices. API drafted, implementation in progress.
USB file-reading API ask qDot for bug Add/Read/Modify files stored on memory cards and USB keys connected to the device. Get notified when storage devices are connected/disconnected. Will be very similar to the Device Storage API above with a few additional methods. Muts be complete by June/July.
Contacts API bug 674720 Add/Read/Modify the device contacts address book. v1 Complete, v2 implementation in progress.
Camera API This is part of the larger WebRTC effort. This is a big piece of work so see the link. API and implementation underway.
Peer to Peer API This is part of the larger WebRTC effort. This is a big piece of work so see the link. API and implementation underway.
Mouse Lock API bug 633602 Lock access to mouse and get access to movement deltas rather than coordinates. API being standardized in W3C. Implementation complete.
Open WebApps bug 697006 Install web apps and manage installed webapps. Also allows an installed webapp to get payment information. Everything needed to build a Opeb WebApps app store. API drafted, implementation underway.
WebNFC bug 674741 Low level access to NFC hardware. So far focusing on NDEF support. API drafted, implementation underway for B2G (not Andorid/Desktop), must be complete by June/July.
WebBluetooth bug 674737 Low level access to Bluetooth hardware. API drafted, implementation underway for B2G headset only, must be complete by June/July.
WebUSB bug 674718 Low level access to USB hardware. Implementation stalled, not important for B2G yet.
Network Information API bug 677166 bug 713199 Get basic information about current network connectivity. API in W3C. Implemented on Android, not yet started on B2G.
Battery Status API bug 678694 Information about battery charge level and if device is plugged in. API in W3C. Implemented on Android, Linux, Windows, B2G.
HTTP-cache API Query what's stored in the browsers http-cache. Add/remove entries. Update expiration time. Get data directly from cache. None
Alarm API Schedule a notification, or for an application to be started, at a specific time. None
Browser API bug 693515 Enables implementing a browser completely in web technologies. Implementation in progress.
Time/Clock API bug 714357 Set current time. Timezone will go in the Settings API. None
Calendar API Add/Read/Modify to the device calendar. None
Intents/Activities/Actions Have a problem? This API will be able solve it. API drafts being discussed on webapi list.
Device Capabilities API Check if the device has certain capabilities, such as front-facing camera, gps, etc. None
Keyboard/IME API Enables implementing virtual keyboards. None
Spellcheck API Enable webpages to check if a piece of text is correctly spelled as well as get suggestions for corrections. None
Background services Enable a web application to run in the background and perform tasks like syncing or respond to incoming messages. Initial proposal of API.
Push Notifications API Allow the platform to send notification messages to specific applications. None
LogAPI bug Allows to register the user activity on the phone. To be created