15. Contacts

The PhoneGap Contacts API provides applications with an interface that can be used to create, locate, edit, copy, and delete contact records from the device’s native Contacts application. The API is not proprietary; instead, it’s an implementation of the W3C’s Contacts API (www.w3.org/TR/2011/WD-contacts-api-20110616/). This API interfaces with the native Contacts APIs provided by the mobile platform, and because of the way the internal API views contact information, there are quite a few quirks that manifest themselves across mobile device platforms.

Example Applications

Two sample applications have been created to help illustrate the features of the Contacts API. Example 15-1 illustrates how to create a new contact within a PhoneGap ...

Get PhoneGap Essentials: Building Cross-Platform Mobile Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.