Mobile
Article
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.

--ADVERTISEMENT--

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.

Conclusion

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.

Recommended
Sponsors
The most important and interesting stories in tech. Straight to your inbox, daily. Get Versioning.
Login or Create Account to Comment
Login Create Account