Cordova 2.9.0: “[ERROR] Error initializing Cordova: Class not found”


When I preview a page of my Android app with cordova.js (2.9.0) in Google Chrome, the page appears with an alert message saying,

The page at file://localhost/ says:
[ ]
gap:["Device","getDeviceInfo","Device1830682625"]
Cancel, OK

If I click on OK another alert appears, saying:

The page at file://localhost/ says:
[ ]
gap:["Device","getDeviceInfo","Device889844386"]
Cancel, OK

When I click on OK, the alert stops with no issues. These alerts pop up only on pages where cordova.js (2.9.0) are called, such as when the page contains external links and invokes the InAppBrowser. No other pages are affected.

I get these alerts on the Mac and PC. I’ve never received these alerts before 2.9.0. Continue reading

Adding Picture Zooming to Your PhoneGap App with iScroll4


I thought that by simply adding “user-scalable=yes” to the meta tag it would enable my pictures  to be pinch/zoom scalable. But such was not the case. Something more was needed, and iScroll4 supplied the missing functionality. What’s extra nice is that doesn’t need Jquery. Here are the simple steps I took to enable my pictures to have pinch/zoom. This was tested on a Nexus 7. Continue reading

Installing a 9-Patch Splash Screen for Android using draw9patch and PhoneGap


Cordova includes a Splashscreen API so you can add a splash screen to your app, which consists of a still graphic image displaying before your app starts.

If you create your Android splash screen as a 9-patch image, then the image will resize proportionally when displayed in either portrait or landscape mode. Continue reading