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.
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.
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
getCurrencyPattern(). In addition, it has methods to perform operations on these topics like
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 documentation,
FileTransfer 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.
Web & App Developer