Device APIs

From RuntimeWiki

Jump to: navigation, search

This feature request calls on all browser teams, particularly mobile browser developers, to faithfully implement the emerging standards around Device APIs so that mobile application developers can developer next-generation mobile applications that take advantage of device-resident services (e.g., geolocation, phone, camera, messaging) using the "Ajax" (i.e., Open Web = HTML+JS+...) platform and industry standard Device APIs so that mobile applications can be portable across popular cell phone platforms.

A key point is that Device APIs needs to be available for both:

  • browser-based web apps (i.e, web pages that run off of the internet)
  • installed apps (e.g., the kinds of apps you can install from the iPhone AppStore)

Background

The Open Web community has recognized for a few years that mobile applications need access to various mobile device APIs in order to fulfill the potential of web-connected mobile devices. The "Ajax" platform (HTML+JS+...) on mobile phones combined with the unique capabilities of hand-held devices (e.g., always-connected, location-aware, phone, camera, SMS) offer possibilities much beyond what is possible from a web-connected desktop or laptop computer.

Standards activities

Two standards organizations are working collaboratively on device APIs standards that will make turn this potential into a reality:

Adapter sofware

Adapter software has emerged in the meantime to allow Mobile Ajax developers to implement portable installed mobile applications using HTML+JS that take advantage of device APIs. One popular package is PhoneGap, an open source development tool "for building fast, easy mobile apps with JavaScript." PhoneGap currently supports iPhone, Android, and Blackberry, and in Dec. 2009 blogged about making PhoneGap available on the Palm. PhoneGap allows a mobile developer to define its user interface using HTML+JS+... (rendered via the phone's browser engine, such as WebKit) and invoke device APIs using the PhoneGap APIs. PhoneGap's platform will map calls to its APIs into the correct platform APIs.

This adapter software is a reasonable stopgap measure that helps mobile developers leverage existing HTML+JS skills and achieve a good level of portability across multiple platforms, but the developer community, including the developers of PhoneGap, agree that the adapter approach has limitations and native implementation of the APIs would be more powerful and convenient. In particular, due to the way that it works, PhoneGap only can deliver device APIs for installed mobile applications. It does not allow browser-based HTML+JS to gain access to device APIs.

Personal tools