Developing Flash Apps for the Sony CLIE (part II)

We’ve been car shopping recently, so I decided to write Loan Star, a loan calculator in Flash 5 for my Sony Clie. I was amazed by how simple and straightforward authoring for the Clie was. By far, the majority of my time was spent getting the amortization and interest formula right as opposed to actually constructing the application. And once it was ready, aside from some minor font issues, I copied the SWF over to my Clie and it looked good and worked perfectly the very first time. As someone who has done mobile development in Java in the past, I found this to be very refreshing.

The biggest hassle (if you can even call it that) was probably transferring the SWF over to the device. SWFs have to be stored on Memory Sticks as opposed to the Clie’s internal media storage, so step one was going out and buying a Memory Stick (I have been contemplating ordering either the 512MB or a 1GB Memory Stick Pro, but since I was in a bit of a rush, I just ran out to Best Buy and bought a 32MB stick). I didn’t buy a Memory Stick reader, however, so I had to transfer the SWF to the stick through my network. Fortunately, the UX50 has built-in WiFi, so I just copied the SWF to a webserver, then downloaded the file and saved it to the Memory Stick. (The UX50 also has built-in Bluetooth which I use extensively, however for some reason, I was not able to transfer the file from my Mac to my Clie via Bluetooth — something I will have to look into further.) The OS knew to put the SWF in the correct directory on the Memory Stick (/PALM/Programs/MMFlash), and the Flash player knew right where to find it. The biggest problem with this particular workflow was that I had to reconnect to the network between each iteration because you automatically get disconnected when switching from the Clie browser to the Flash player. And I had to remember to clear the browser’s cache between iterations, as well, to make sure I wasn’t testing a stale version. Fortunately, thanks to the consistency between the Flash player on the Clie and that on my Mac, there were only a couple of iterations, and all of the issues were purely cosmetic.

Aside from font and processor considerations, and mentally trying to roll back to Flash 5, developing for the Clie was really very simple. It was great to be able to test the calculator right in the Flash IDE without having to use an emulator, or worse, having to constantly copy the bits over to be tested on the actual device. If the application were more extensive, I’m sure I would have run into more issues, or at least architectural considerations, however from what I can tell, developing for the Clie (and devices in general) with platform independent technologies like Java and Flash mostly just requires a little more diligence and attention to resource limitations. And realistic expectations, of course.

I use my Clie on my home wireless network frequently, but yesterday, I got my Clie connecting to the internet through a Bluetooth connection to my phone, which connects via GPRS, so now I am going to look at building a more network-oriented application. If I have time, I might also see how much luck I have getting IBM’s WebSphere Micro Environment JVM running on my Clie, as well. I don’t have high hopes, but being able to write Java applications for my Clie is a very tempting prospect.

If you are considering doing some Flash development for the Clie, step one is to download the the Sony Clie Developer Kit from the Mobile and Devices Developer Center on Macromedia’s site. Feel free to check out the source code for Loan Star, as well, or if you simply want to install it on your Clie, use this URL:

http://www.markme.com/cantrell/flash/loan_star.swf

And just to drive the platform independent point home, here is the finished product: