Add a pinch of Pointer Events to your Apache Cordova or PhoneGap app

clip_image002[3]Here is a new open source plugin for Apache Cordova by Microsoft Open Technologies, Inc. The plugin makes it easy to use the Pointer Events model in your Cordova or PhoneGap projects.

Developing mobile Web apps that will run on various devices is challenging for many reasons. One of these reasons is the variety of input types and models (touch, pen and mouse). As a developer you have to consider supporting touch on smartphones and tablets, eventually pen on tablets, mouse and pen on Surface devices, etc. You will also have to code for the different input models the different browsers expose.

To solve this issue, the industry is defining the new Pointer Events standard. The availability of Internet Explorer 11 for developers marks a new milestone of the Pointer Events journey as it now exposes the non-prefixed Pointer Events API. And for browsers not yet implement Pointer Events, you can use one of the already published polyfills such as Hand.js, or the Polymer Pointer Events polyfill. This means you can already use pointer events in your Web app or Website code starting today. And if you are wrapping your Web app into a Cordova (or PhoneGap) application, then you can take advantage of this new plugin MS Open Tech has published to easily enable Pointer Events support for your Cordova app.

Pursuing its engagement with the industry and the communities, MS Open Tech published the open source plugin on GitHub. We used the Polymer Pointer Events polyfill to implement support for Android, BlackBerry 10, iOS and Windows Phone.

Installing the plugin using the Cordova CLI tool is as simple as typing the following command in your Cordova project:

Cordova plugin add

Here is a demo video of the plugin in action: running a simple Cordova game leveraging Pointer Events on Windows Phone 8 and Android.

To get started with Apache Cordova and its CLI tool, visit For more info on Pointer Events, the WebPlatform Pointer Events wiki page is helpful. And last but not least, to use the Pointer Events plugin for Cordova, visit our GitHub repository.

One thought on “Add a pinch of Pointer Events to your Apache Cordova or PhoneGap app

  1. Pingback: Sep 18 Development | Jang Hee I