Mobile device support by web apps using Apache Cordova


Mobile web developers that create HTML5 apps can use Apache Cordova (formally known as PhoneGap) to access native mobile device functionality. For instance, by using HTML, CSS, and Apache Cordova’s
JavaScript APIs, mobile web developers can access a phone’s camera, geolocation, and contacts. There are several device features for Windows Phone 7, Windows Phone 8, and a
variety of other devices that are accessible using Apache Cordova. And because Apache Cordova's APIs are available on a variety of device platforms, porting your HTML5 apps is easy.

Watch the following video about how to get started with Windows Phone 8 and Apache Cordova.

 

 

 The areas of Windows Phone device support using Apache Cordova are detailed in the table below. Note that each links to Cordova’s API documentation.

API

Description

Accelerometer

Use the Windows Phone sensor to detect the change in movement relative to the Windows Phone orientation.

Camera

Use the Windows Phone camera to take or retrieve photos.

Capture

Use Windows Phone capabilities to capture audio, video, and images.

Compass

Use the Windows Phone sensors to determine the direction the Windows Phone is pointing.

Connection

Use the Windows Phone networking capabilities to determine the Windows Phone network connection state and the type of connection.

Contacts

Use Windows Phone capabilities to retrieve contact information.

Device

Use Windows Phone capabilities to retrieve device information.

Events

Use the Events object to determine Apache Cordova lifecycle events and Windows Phone events.

File

Use the File object to read, write, and navigate the Window Phone file system.

Geolocation

Use Windows Phone capabilities to determine Windows Phone location information.

Globalization

Use the Globalization object to determine Windows Phone locale details.

InAppBrowser

Use the InAppBrowser object to launch another web browser instance.

Media

Use Windows Phone capabilities to play and record audio media from Windows Phone.

Notification

Use the Notification object to provide Windows Phone tactile, audible, and visual notification feedback.

Splashscreen

Use the Splashscreen object to show and hide the splash screen of the Windows Phone app.

Storage

Use the Storage object to provide access to Windows Phone local storage.

 

Additional Apache Cordova and Windows Phone resources:

PhoneGap Blog - Apache Cordova and Windows Phone 8

Getting Started with Windows Phone 8

MSDN Magazine - Develop HTML5 Windows Phone Apps with Apache Cordova

For developers favoring HTML development who want to be able to target multiple platforms, Apache Cordova is an option, and it has support for Windows Phone and Windows 8. See the PhoneGap site for a list of Getting Started Guides that provide more details about the supported device platforms. And, be sure to see some of the interesting mobile apps that have already been created using Apache Cordova.

 

- Erik

Skip to main content