By Aurelio De Rosa

What’s New in PhoneGap 2.2?

By Aurelio De Rosa

The day after Halloween, we all received a great gift from Adobe — the release of the latest version of Cordova, better known as PhoneGap. The new 2.2.0 version introduced several interesting supplementary features and enhancements. This article will show you a brief overview on these new changes to PhoneGap.

As you may already know, PhoneGap is an open source framework that allows you to build cross-platform mobile apps using consolidated web technologies like HTML, CSS, and JavaScript. The speed with which the Nitobi team and now the Adobe team now releases new PhoneGap versions is impressive, and every release has consistently been a solid a step forward. Here’s what’s the latest version, 2.2.0, has to offer.

The most significant change, in my opinion, is the support for the brand-new Microsoft Windows 8 operating system. Starting with this release, you’ll be able to develop your PhoneGap applications for Windows 8. To develop these apps, you’ll have to develop in Windows 8. And, just like the Windows Phone 7 equivalents, you’ll have to use Visual Studio as your IDE. The official online documentation has a getting started guide that will help you to set up the environment that you need to develop your mobile apps using PhoneGap.


The Cordova team has also announced that in the next releases they’ll also add the support for Windows Phone 8, not to be confused with the Windows 8 desktop operating system. They’ve also announce massive performance increases both on Android and iOS. The team announced that the PhoneGap 2.2.0 JavaScript bridge will improve your apps execution by a factor of 15-25 compared to the older versions.

Additionally, the Globalization plugin has been integrated into the PhoneGap core. This plugin allows you to get information about user’s locale and timezone using methods like getPreferredLanguage()getLocaleName() and getCurrencyPattern(). In addition, it has methods to perform operations on these topics like stringToDate() and numberToString(). These improved methods can make for highly personalized app experiences that measure up very well against native apps.

Currently the supported platforms are Android, BlackBerry WebWorks (OS 5.0+), and iOS. But, as always, in the next releases the support will be extended to other operating systems. In case you need more details you can read the specific section of the official documentation.

A couple of changes have been introduced for the FileTransfer API. Citing the official documentationFileTransfer is an object that allows you to upload files to a server or download files from a server. The PhoneGap curators have also added the support for the onprogress event to meticulously track of the progress of a transfer operation and add the possibility to abort a transfer operation. This API is one of those that are already available for Windows 8 too. As well as the Globalization API, the Splashscreen API has been added to the official documentation, so now you can find a specific page within the PhoneGap documentation. This new API allows developers to show or hide the application’s splash screen. Currently, the support is only for Android and iOS.

Several changes have been made to the process in which mobile developers create an Android plugin that allows extension of PhoneGap’s basic functionality. Now, it must have at least one Java class that extends the CordovaPlugin class, which replaced the old Plugin class. Like in previous versions, a plugin must override one of the execute methods, but now PhoneGap developers have a new execute() method that allows them to pass a large amounts of data to the native side. It also has a new onReset() method, called when top level navigation changes. You can read more details on this matter looking at the official documentation page.


PhoneGap is an extremely robust mobile development tool, and it is curated constantly and carefully. In addition to the explained new features, a lot of bugs have been fixed and many minor enhancements have been added. If you want a detailed list, you can read the official changelog, or the two platform-specific posts published; one post on Android and the second post on iOS. Maybe you’ll find that they fixed exactly the feature you needed to make PhoneGap your development framework of choice.

  • i like more sencha touch and if i dont want to make it easy i will use buzztouch

    • Sencha is a great framework too and a lot of great apps have been built using it. However, until now, I’ve never had the need to replace the pair jQuery Mobile + PhoneGap.

      • Prad

        I’ve had lot of buggy issues with JQM combined with Phonegap. Flicker transitions, footer nav bar not being consistent on all versions of iOS and android, back buttons behaving weird in ios6. But biggest gripe was not being able to have clean transitions, JQM wasn’t able to get the skinning of dynamic injected data before the transiton effect, interestingly this would work without any drama on ios4.3. A lack of template system was also a bit concern, had to come up with my own reusable one page template system with dynamic injection of data which didn’t seem to work well for me. At the end it became all hacky and a bandaged app solution. Keen to hear from you on that front and any apps you made that I can see.

  • Andrew

    Good writeup. Thanks for hitting the highlights.

    • Thank you for your comment. I’m glad you liked the article.

  • Thanks for the heads-up on the new stuff in PhoneGap 2.2! Looking forward to it!

  • I love the framework… but please get the name straight. Looking for answers using both phonegap and Cordova, its so difficult.

    • I understand your frustation, however the problem is that Cordova became famous when it was PhoneGap and a lot of people still don’t know they’re the same thing. Hopefully, you’ll see the term PhoneGap will disappear slowly in the next months.

  • Thanks a lot for the post! As a Cordova committer it’s nice to see people stoked on the work we do :)

    • Thank to you and to all the others developers for such a great framework.

Get the latest in Mobile, once a week, for free.