PhoneGap

PhoneGap Day(s) and a Call for Speakers

phonegapThe PhoneGap team just announced the dates for PhoneGap Day(s). This year PhoneGap Day will be held in San Francisco on October 24th and Berlin on September 26th. As before, there will be full day workshops on the day before. For more information, visit the web page: http://pgday.phonegap.com/

I attended last year’s PhoneGap day in Portland, and can easily say it was a great event. I am looking forward to attending it again.

In addition, the call for speakers is open as well. I am working up a few topics that I plan to submit. What is nice is these talks are short and sweet (about 20 minutes), so it is perfect for . Hope to see you there!

Cordova 3.5.0 Now on PhoneGap Build

PhoneGap Build has added support for Cordova 3.5.0.

I will be updating ConfiGAP shortly to support this, but in the meantime, you can edit your  config.xml with <preference name=”phonegap-version” value=”3.5.0″ />.

If you want to know what’s in 3.5, you can read more about it at:

PhoneGap Developer App for Windows Phone 8

Windows 8

The PhoneGap team announced that the PhoneGap Developer App is now available on the Windows Phone Store. It supports not only Windows Phone 8, but also the upcoming 8.1 update!

For newcomers, the PhoneGap Developer App aims to lower the barrier of entry to creating PhoneGap apps. You can immediately preview your app on a device without installing platform SDKs, registering devices, or even compiling code. Plus, you have full access to the official PhoneGap APIs.

Possibly the most exciting aspect of this announcement is that you can now develop your apps on an OS X machine and preview on a Windows Phone device. Cross-platform, indeed!

I somehow missed posting this correctly, but that I would go ahead and post it even though it is a bit late.

Edge Animate & PhoneGap Build: part 2

In a previous post I wrote on how to convert the audio playback that Edge Animate uses into some that PhoneGap is able to use.

It that post I had this function:

function getPhoneGapPath() {
   var path = window.location.pathname;
   path = path.substr( path, path.length - 10 );
   return 'file://' + path;
};

There a first a slight error that I introduced. When finding the path name, I stripped out 10 characters. This was based on the test case being based on index.html. So if you happen to bring this function into another page with a different file name it would break. Rookie mistake. Actually more like too much prototyping and not enough ‘real’ coding…

Also we actually don’t need the entire path, so based on the platform we can locate our ‘root’ directory and go from there. Here is a revised version of the function:

function getPhoneGapPath() {
  var devicePlatform = device.platform;
  if (devicePlatform === "iOS") {
    path = "";
  } else if (devicePlatform === "Android" || devicePlatform === 'android') {
    path = "/android_asset/www/";
  }
return path;
};

Now two things to note here. 1) I am ignoring other platforms, so if you need to support one of the other platforms that PhoneGap does support, add in the proper if clause. 2) Every time this function is called, I query the device.platform. Now using your phone is actually a Transformer, this value is not going to change. I would recommend making this query once, say upon deviceReady() and storing the value in a variable and referencing it within this function. Also note that you will need to make sure you also include the device plugin in your PhoneGap app as well.

 

Cordova: What’s Next

The Cordova team just released a What’s Next guide. This guide contains the following topics:

  • Best Practices
  • Handling Upgrades
  • Testing
  • Debugging
  • User Interface
  • Keeping Up
  • Getting Help

They dive into some additional topics like Click versus Touch and CSS Transitions versus DOM Manipulation.

So if you are doing PhoneGap/Cordova development, spend some time reading over it, there is a lot of great information.

Cordova 3.5.0 was released!

Apache_Cordova_3_5_0

A few days ago, the Cordova team released version 3.5!

There are a whole host of items that were updated, and you can read them in all their glory here.

Some of the bigger items was dropping support for iOS 5 and gaining support for arm64. This will also be the last release with support for Windows Phone 7.

I would expect to see support for it in PhoneGap Build in a few weeks. As always I will be updating ConfiGAP to target this new version shortly as well.

Apache Cordova 3 Programming

Apache Cordova 3 Programming

I recently finished reading Apache Cordova 3 Programming by John M. Wargo. The quick summary is this book is a great introduction to the Cordova/PhoneGap platform for both novice and experienced Cordova developers.

The book’s topics include:

  • How to install and use the Cordova CLI and associated tools
  • How to configure the Android developer tools (ADT) to run, test, and debug your Cordova applications for Android
  • How to use Xcode—Apple’s development tool for iOS development—to run, test, and debug Cordova applications for iOS devices
  • How to use the Safari browser to debug Cordova applications on iOS devices
  • How to use the Microsoft development tools to run, test, and debug Cordova applications for Windows Phone 8
  • How to set up and use the PhoneGap Build service to package Cordova applications and share those applications with others
  • How to create Cordova plugins for both Android and iOS

Filled with lots of examples and code, the book includes includes complete coverage of Android, iOS, BlackBerry 1.0 and Windows Phone development for Cordova.