PhoneGap 1.9 Released

This post is more than 2 years old.

A few minutes ago (although according to the blog post this happened tomorrow), PhoneGap 1.9.0 was released. The post details the fixes and updates and I encourage you to read it for the full list. One thing in particular stood out for me - build scripts. Back when I used Eclipse, I had an additional plugin that would handle the proper inclusion of PhoneGap files and mods in a stock Android application. When I stopped using Eclipse, I resorted to the manual process, which isn't difficult but I had hoped someone would get around to creating a simple script to handle it for me. And the PhoneGap guys did. They rock.

Once you download the bits, you can find a create script for Android, iOS, and Blackberry. I tested the Android one just now. After first ensuring I had the Android SDK in my path, I simply ran the script and it generated a complete Android+PhoneGap project.

If you don't use any options it just uses a set of defaults but you can tweak the folder where the code is created, the package name for the application, and the activity. The generated HTML includes code that demonstrates a variety of PhoneGap APIs, including device info, accelerometer, geolocation, and others.

Once generated, you can also quickly send it to your device or your emulator with another few command line calls.

For details, look in <extracted zip>/lib/android/README.md.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by Steve posted on 7/3/2012 at 12:29 AM

I was wondering, since your no longer using eclipse, what are you using for your mobile development.

Also, how does dw cs6 & phonegap build change the game for using the phonegap api and building apps? Basically, what you do differently from the getting started guide to work with dreamweaver compared to eclipse? Jar files still needed? What folder paths/structure would you need to use, etc....

Comment 2 by Raymond Camden posted on 7/3/2012 at 1:05 AM

I just use a simple editor. Right now that is either Sublime or Brackets. I then use the command line or the Build service to generate binaries.

"Also, how does dw cs6 & phonegap build change the game for using the phonegap api and building apps?"

It makes it easy. I have a LOT of respect for DW. It's just not my preferred editor.

"Basically, what you do differently from the getting started guide to work with dreamweaver compared to eclipse?"

So are you asking how to setup Eclipse for PG development? I'd check the phonegap docs as they discuss the setup.

Comment 3 by steve posted on 7/3/2012 at 4:29 PM

Thanks for the info. You actually introduced me to phone gap back on version 1.2 with your megagap posting.

I'm ok with getting a site setup in phonegap with eclipse.

When using dreamweaver as your editor, and using their phonegap build service, there doesnt seem to be any documentation on the steps needed for using cordova.

Does my folder structure need to contain lib, folders, or contain the jar files...

or

do I just need to reference cordova.js in the code and send it all up to the phonegap build site and they do the rest?

Comment 4 by Raymond Camden posted on 7/3/2012 at 5:07 PM

Ah, I think I get you. So the only thing you need to do special is <script src="cordova.js"></script> Build will notice this and do the right replacements. Everything else - structure wise - can be up to you.