Mobilism: After HTML5

by May 14, 2011

In his After HTML5: Mobile Device APIs and PhoneGap talk at Mobilism in Amsterdam, Netherlands Brian Leroux discussed the next mobile Web revolution, Device APIs, and how they are being prototyped in the PhoneGap project. Here’s my notes from his talk.

  • Going into low-level native code is like going to the dentist. But device APIs live in native code and they make your smartphone aware of what’s going on. Your smartphone is perhaps the most personal part of your identity.
  • What’s in HTML5? localStorage indexedDB CACHE MANIFEST pushStated ata-* sockets? Canvas Video geo drag’n’drop offline events web worker audio new elements...
  • Installable Web apps are chrome-less Web instances. You can create an experience on the iPhone that mimics an app without going through the Apple app store. Chrome-less Web apps are kind of like widgets (which have been available on other mobile platforms for a long time).
  • HTML5 gives us some tools for dealing with offline access in Web apps. IndexedDB is the new spec for a database on devices. IndedexDB is built on top SQLlight (former name).
  • Network Info API allows you to see if you are online/offline, on WiFi, on 3G, or on EDGE. This can help with determining what to send a device.
  • Device APIs can be related to sensors, data persistence, and outputs.
  • Sensor APIs cover things like GPS, gyroscope, accelerometer, ambient light. They are often like asynchronous events.
  • Data persistence APIs manage contacts, media, locations, or anything a sensor may log. Create, Read, Update, Delete.
  • Device output APIs manage functions like vibrate, ring, call, play music. Screen is the ultimate output (and there could be multiple screens).
  • Implementers like Google Gears, Nokia WRT, Blackberry WebWorks, HP webOS, and Samsung Bada are working towards making the Web a first class platform for software development.


  • The nicest thing about standards is that there are so many of them to choose from.
  • W3C Device API working group (DAP) is tackling a lot of different device API standards including Contacts, Calendar, Media Capture, Messaging, Battery Status, Network Info, System Info.
  • The media capture API was implemented in Phone Gap last week: audio, video, and images can be pulled from the device. Also supports multiple cameras.
  • Messaging can be done through SMS and MMS URL protocol handlers. This involves native UI so the user knows what is happening. Which is kind of a security feature.
  • We don’t want permission dialogs to be modal, but we don’t want there to be no notifications either. There’s no right answer yet only ways we don’t want things to work yet.
  • WAC is a group of 72 carriers. They want to take device APIs and allow Web apps to be federated across app stores. If this works, you only have to upload once. This group is working on a really similar set of APIs to the DAC (mentioned earlier). Target abstraction of WAC and DAC is Javascript –should be easy to write a shim over them.
  • Hi5 is a wrapper around many of these device APIs that acts like JQuery by standardizing access to them. Nascent work in progress.
  • Device manufacturers all realize they have a shot at an operating system all operating for mindshare. With all these platforms come a bunch of different SDKs. The Web solved this problem a long time ago. But companies still aim for app stores.
  • Emulators don’t really emulate anything. We need to test on actual devices.
  • There are 111 app stores. Build mobile Web first. Phone Gap is progressive enhancement to help you get into app stores.