a.k.a devgeeks

Software development in the minutes a day I have spare

The main reason it took so long to port the 4ZzZfm app from Objective-C to PhoneGap had nothing to do with PhoneGap, really. It had to do with adding new functionality at the same time that I had been wanting to add in for some time.

4ZzZfm has a program schedule that changes at the very least every quarter or so. There are also small things that change from time to time for various reasons. Up until this version of the app, changing that program information in the app has meant my updating the schedule manually, then updating the app and submitting a new version to the App Store.

Needless to say, this didn’t happen as frequently as it should have.

So for this version, it was important to me to have the guide be updated from within the app with no updates to the code required. Though getting there was a bit of a challenge, the current version of the app does indeed include that functionality. However, it had not actually been tested in a “live” environment… until today. :)

Today I pushed an updated version of the guide to the server and the app should automatically use that version the next time it starts up (though the background behaviour of iOS and Android mean that this might not happen unless you close it all the way or don’t use it for a given period of time… not entirely sure what all triggers the app having to start from scratch).

Anyway, it seems to have worked. If you or anyone you know has trouble with the app updating the guide, please let me know, but for now I am calling it a success.

If you haven’t already checked out 4ZzZfm and / or the app, it’s available for iPhone and Android now.

Dear 4ZzZfm and lovers of the best community radio station ever

The 4ZzZfm iPhone app has been updated to version 3.0. This new version should always have an up to date Program Guide. It can now update the guide over the internet so it will no longer need an updated version to have a correct guide.

http://devgeeks.org/iphone-apps/4zzzfm-iphone

or on iTunes:

http://itunes.apple.com/au/app/4zzzfm/id359090535?mt=8

oh… and for those that have brought it up whenever the 4ZzZfm iPhone app is mentioned…

Meet the 4ZzZfm Android app!:

http://devgeeks.org/android-apps/4zzzfm-android-app

or on the Android Market:

https://market.android.com/details?id=org.devgeeks.fourzzzfm

So here we are. Almost four months to the day since I last posted about porting the 4ZzZfm iPhone app to PhoneGap, it’s finally awaiting review in the App Store.

A lot has changed from starting out to getting to this point. I’ll be writing a much bigger post about the whole experience (including my new-found hate for timezones and date math), but till then… I am just happy to see the back end of it. :)

Now let’s see if we can get past the approval process OK.

It’s that time again. Time to update the 4ZzZfm iPhone app. Actually, it’s way past due… but this is the way things go sometimes.

Early on I attempted to use some of the “write your app in HTML/Javascript/CSS and deploy to iPhone” technologies, but at the time their acceptability by Apple for App Store distribution was in doubt, and I couldn’t get them to do what I wanted anyway. This meant I had to actually learn Objetive-C. Now let me just say that I really like Objective-C. The problem is that I am primarily a PHP developer so HTML/JavaScript/CSS feels more natural to me.

This has lead me to revisit the above-mentioned web technology options for iPhone app development. PhoneGap in particular seems to be both quite mature, used a great deal in apps in the App Store and quite extendable via plugins. This last part is the bit that has tipped it for me. Not only are there some great plugins available for PhoneGap, but it is quite easy to write your own plugins.

What this all comes down to is that I am going to try and re-write the 4ZzZfm iPhone app using PhoneGap and write whatever plugins I need along the way that aren’t catered for in PhoneGap’s core or plugins written by others.

I have already started on this process and I have the Audio Streaming classes written by the amazing Matt Gallagher (cocoawithlove.com) that I used in the original Objective-C version of the app (mostly) working as a PhoneGap plugin. The remote control events don’t work yet, and I am not sure that will be possible from a plugin anyway… that might require some hacking of the PhoneGap core. We’ll see. It needs some more work update: I have had the remote control events working fine. No core hacking needed. Then between updating PhoneGap and iOS something went wrong.

Another piece of functionality I need for the 4ZzZfm iPhone app is a volume control slider. In the Objective-C iPhone SDK that is implemented using an MPVolumeView (from the MediaPlayer framework).  This turned out to be a very easy to make into a PhoneGap plugin. Now one of the best things about PhoneGap is that it and its plugins are open source. PhoneGap and its plugins are developed by the PhoneGap community and available on GitHub. So I have decided to join GitHub myself and submit any plugins I create for this project that I think others might find useful. The first of these that have been added to the main PhoneGap plugins repository is the aforementioned VolumeSlider plugin. I am pleased as punch about this as it is my first real contribution to a modern open source project. Hopefully it is just the first of many more such contributions.

Wish me luck. Worst case I can always just stick with Objective-C.

Hooray! My latest update to my 4ZzZfm iPhone app is live on the Apple App Store.

Took a bit longer to get approved than the original submission… I guess due to all the iPad app submissions that must be going on at the moment.

What’s new in version 2.0:

  • 4ZzZfm Program Guide navigable by day and time
  • “Now Playing” program listing in stream player view
  • Program Guide displayable in either QLD (Brisbane) time or your local timezone (especially helpful for overseas listeners)
  • Settings bundle for switching between local and QLD time in the Program Guide

So I have finally gotten the chance to submit the next version (2.0) of my iPhone app for the community radio station 4ZzZfm to Apple for approval.

Hopefully I managed to do everything right in the submission process… I took so long between versions I forgot what I did last time ;)

I am very close to being ready to submit the next version of my 4ZzZfm iPhone app to Apple for approval.

I have been hard at work adding features and a better UI experience and I think it’s finally done.

The main addition to this version is the Program Guide. It is a complete 4ZzZ program guide navigable by day and time. It displays detailed info about each show on 4ZzZ (where available). The streaming player screen even shows what program you are currently listening to.

The best bit though, is that the Program Guide can be told to display itself in your current local timezone. I know, I know… it’s no longer Daylight Savings time here in Australia. So the east coast Australian users won’t benefit from this feature till next year. However, anyone in SA or WA will get the Program Guide in their local timezone, not in QLD time.

Best of all, all the users in other countries will benefit most of all as it’s not just a matter of a couple hours one way or another… some programs would be on different actual DAYS in their local area. This new Program Guide handles that. Doesn’t matter if you are in Japan or Canada.. it works off what you have as your local timezone in your iPhone.

Controlling this switch is a new settings screen from within the app, and a settings bundle in the iPhone’s settings app. The in-app settings screen however has another useful feature. It can rebuild the Program Guide if you for any reason find yourself in a new timezone! Just rebuild the Program Guide and you are good to go.

Below is a gallery of screenshots… as always, the gallery software cuts off the screenshots a bit in the thumbnails so be sure and click through to the larger version of each image.

That’s right… the 4ZzZfm stream is down. OK. So anyone who uses my 4ZzZfm app will not be able to connect to the station.

It’s been like that for a few days now. It sucks, but it’s community radio and neither expertise or money flows freely… plus I believe the streaming server is a shared resource with another station.

Hopefully it will be back up soon :(

I have been hard at work on the next update to my 4ZzZfm iPhone app and it is nearing the stage where I can release it to my beta testers.

Added so far in this new version:

  • Program Guide navigable by day (which shows are playing at what time, and a little info about them).
  • Settings allowing the program guide information to be displayed either in original Brisbane/Queensland time or translated to your current local timezone (a great deal of the downloaders of the first version were a long way from Brisbane).
  • Display of the currently playing show in the stream playing view.

Here are some screenshots to show what I mean (the gallery cuts the images off a bit… click them to see the full image):

I have been trying to think about how I would add all the features I want to get into the next version of the 4ZzZfm app.

The urge to revisit this app again so soon after the first release has been spurred on at least partially by Apple’s recent purge/blocking of apps that it has deemed of little additional benefit over say… web apps. The 4ZzZfm app is neat in that it is a good branding exercise for 4ZzZ, but none of it’s functionality is really specific to it. It is certainly possible to stream the radio station online without it.

So with that in mind, I want to make sure there is no question about the benefit of the app over just going to the 4ZzZfm website.

The other great thing about the features I want to add to the app is that most of them will require me to learn some new interesting aspect of iPhone development (Table Views, Navigation Controllers, Core Data or communication via JSON with a RESTful web app, etc).

So although I am hanging out to write something new… this should still be the best learning path for now. So… back to the 4ZzZfm iPhone app “drawing board”.