Twitter: raymondcamden


Address: Lafayette, LA, USA

PhoneGap Build adds Hydration

08-23-2012 11,726 views Mobile, Development

After getting a snazzy UI upgrade a few weeks ago, PhoneGap Build today released their new Hydration feature. You can read more about it at the docs, but essentially Hydration makes rebuilding much quicker and makes it easier to notify testers of new builds. Let's look at a quick example.

Hydration is enabled/disabled in the settings area of your app. It can be used with old or new apps but only supports PhoneGap 1.8 and higher and just iOS and Android.

I created a quick HTML file, saved it as index.html to my desktop, and uploaded it to Build. I opened up Build on my phone, navigated to my app, and clicked the Android icon to download it.

After installing the application, I told my device to open it. Immediately you will notice a different loading experience:

On the first load, it will prompt you to reload. (Technically this is the very first load, so it isn't really an update per se, but you get the idea.)

The user has the option to update and restart or ignore. Once you update to the latest, the application loads as normal:

Perfect. Let's say I edit the HTML a bit (it really needs something more). I upload the file, close the app and restart it, and it recognized a new build immediately. This was approximately 5 seconds after I hit upload. I'm not sure you can count on it always being the fast, but, I'm an evangelist so I'll go ahead and promise it!

The point is - if you have folks testing - they can get the new updates quicker and without having to go to Build or download an APK. It recognizes the new version exists and does everything for you. Awesome!

And voila - my new version is here with the one thing it was missing...