Dynamically loading the correct PhoneGap.js file for Android or iPhone

I am in the process of putting together a mobile development class and have been trying to figure out the best ways to get students who are new to PhoneGap and Mobile development going on cross-platform development. One of the issues I have been trying to solve is the fact that PhoneGap apps use a different phonegap.js file on each platform. This is a problem that I do not feel is well documented and one that is not easily and cleanly solved.

Since PhoneGap applications require these different JS files I have been unable to find a good way to start building a PhoneGap application in, for example, Eclipse with the Android Development Tool as an Android project and then be able to quickly and easily switch over to XCode and launch the same application as an iOS app. I always need to go and replace the phonegap.js file with the iOS one first and then switch it back before I go back to working in Android. Not a great workflow.

I could probably solve the problem with custom build scripts. I could set up build scripts for both iOS and Android to properly retrieve the correct file and stuff it into the build prior to compilation, but this is not something I want to take the time to do in the classroom (I also don't want the students to have to worry about trying to set up ANT at home). This also prevents me from having an application that can simply be downloaded from GitHub and run without modification. It's also more code to manage. I would need to maintain X number of build scripts (one for each platform) for all of my projects. Sounds like a PITA.


My Presentation Files from the MN Government IT Symposium

Last week I had a great time presenting a couple of topics at the MN Government IT Symposium. Here are the slide decks from my presentations:


Getting your BlackBerry PlayBook development environment set up - Part Three

In this post, we're going to look at setting up FlashBuilder 4 to talk to our BlackBerry PlayBook virtual device. We'll also create our first PlayBook App.

Note, Parts one & two of this series are prerequisites to this part.

Something New

My last two posts were SO LONG, and took a while to load. All of the screen captures and images really annoyed me. So I decided to do this post using Adobe Captivate.


Getting your BlackBerry PlayBook development environment set up - Part Two

I wanted to release this a couple days ago, but I have been battling connectivity problems at home.

In my last BlackBerry PlayBook post we went through what resources we needed and how to get Flash Builder 4 installed and integrated with the BlackBerry PlayBook SDK. Next we'll look at installing the BlackBerry PlayBook simulator.

The simulator is actually a bootable ISO image that is intended to be run inside of a VMWare virtual machine. I am sure there are resources on how to get VMWare Player (Windows) or VMWare Fusion (Mac) installed on your system, so I will not be covering it in this post. Instead, I will assume you already have it installed.


What can I do on different devices? Adobe AIR

So in an effort to figure out what I can do with different devices, I came across this VERY useful document on Adobe's site. It essentially outlines the features of AIR that are not available across platforms and tells us, of those features, which are available where.

For example, I suspected, but did not know that the Encrypted Local Store would not be available on mobile devices (yet?).

If you plan to develop for multiple device profiles (Desktop, Mobile, TV) then you need to take a look at this:


Getting your BlackBerry PlayBook development environment set up - Part One

I, like many others, am VERY excited about the BlackBerry PlayBook, due out sometime early 2011. One of the reasons I am very excited is that Blackberry has partnered with Adobe to make Adobe AIR one of the easiest ways to start making apps for the PlayBook. I LOVE Adobe AIR and have been using it for almost two years now for developing desktop applications.

So the first question that many new AIR developers might have are:

  1. What do i need to know?
  2. How do I get started?
  3. Where do i get what I need?
  4. What's next?


BlogCFC was created by Raymond Camden. This blog is running version 5.9.1. Contact Blog Owner