Appendix D

PhoneGap Plug-ins

An entire community of developers has started creating plug-ins for PhoneGap on Android and iOS device platforms. (There are currently no plug-ins yet for Palm and BlackBerry.) The idea behind a plug-in is simple: Create native and JavaScript code solutions that other developers can “plug in” to their projects and, thus, quickly and easily extend PhoneGap’s capabilities.

Currently, all PhoneGap plug-ins are hosted at, which is shown in Figure D-1.

FIGURE D-1: Site where PhoneGap plug-ins are hosted


This appendix summarizes each of the available plug-ins for each platform.


The following plug-ins are available for Android:

  • Analytics
  • BarcodeScanner
  • BlueTooth
  • ChildBrowser
  • ClipboardManager
  • ContactView
  • FileUploader
  • FtpClient
  • PayPalPlugin
  • PowerManagement
  • Share
  • SoftKeyboard
  • StatusBarNotification
  • TTS
  • WebIntent


Use this plug-in to integrate Google analytics with your Android app. It creates a object.

To start, enter the following code:

 * Initialize Google Analytics configuration
 * @param accountId         The Google Analytics account id 
 * @param successCallback   The success callback
 * @param failureCallback   The error callback
  start(accountId, successCallback, failureCallback);

To track a page view, use the following code:

/** * Track a page view on Google Analytics ...

Get Beginning PhoneGap now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.