Friday, November 21, 2008

Radio Paradise

I have yet another "radio player" app in the iTunes App store. It's called Radio Paradise and, as the name implies, allows listening to music from the Internet radio station, radioparadise.com. I've been a listener for years, so I asked the owner of the station for permission to make an official iPhone app for the station.

I also used the app as an opportunity to test out a few additional features. The app will detect the type of connection you have (either cellular or WiFi) and will automatically use either a 64K or 128K stream. I originally had buttons in the app to allow the user to select the stream quality, however Apple rejected that idea because it would be possible to a user to select a 128K stream over cellular and in Apple's judgement that consumed too much bandwidth. I could have restrict the choice when on a cellular network, but for now I just simplified it and the app makes the decision for you.

The second feature this app uses is the inclusion of album artwork for the current track playing. Radio Paradise embeds in the audio stream the URL for the current artwork. So, it was simply a matter of having my app fetch the image as the song is playing.



The third feature is the implementation of a mini web browser. This will allow the user to visit the Radio Paradise web site while still listening to the music. Apple doesn't allow third party apps from running in the background, so normally if you were to launch Safari, the radio player is forced to exit. The mini browser also includes a button to allow the user to launch Safari if they really want to.



This app took by far the longest yet for gaining Apple's approval. It was almost a month! The biggest issue I kept running into was Apple claiming my app didn't throw up a message box informing the user when there was no network. I kept testing it and it always worked for me. After about 4 re-submission attempts, I finally discovered Apple was testing using the 2.0 iPhone OS and I was testing with 2.1. (It sure would have been helpful had Apple actually told me what OS they were testing with. I even asked, but never got an answer.) It turns out the "reachability" flags returned are slightly different between 2.0 and 2.1. Once I finally discovered that issue the app was quickly approved ("quickly" in Apple-speak means a few days).

Oh, and check out the size of this app - all those features and it's only 130K! Yes, K! I put my code on a diet! (Actually, it's because Apple's libraries, or frameworks, do much of the work and the frameworks are already installed on the phone.)

10 comments:

Jason said...

I am loving this app! Thanks so much for making it. I am curious, is it streaming the MP3 streams, or the AAC streams?

Maarten Houwer said...

Thanks for this app! Makes listening to my favourite station more easier!

Barry said...

Hi I have downloaded this app twice and both times it don't work properly the stream keeps breaking up which is totally useless any idea's on how to fix.by the way i am on a ipodTouch 2G. Thanks Barry

Keirsun said...

Now, more than ever, I'm a little pissed at Santa for keeping my iPod Touch for himself. The best online radio station... on the go... thank you Brian.

Web design Brisbane said...

How cool is that? Yet another application to play with at lunchtime. Thanks for the post.

Nicholas said...

Could you add support for stopping playback when headphones are removed from the jack? I didn't realize this was not a standard feature but apparently it isn't, and I've had a number of awkward experiences when Radio Paradise started playing to everyone around me.

Mostly Torn said...

Ah! Good suggestion Nicholas. I'll make sure it's in the next update!

hugoallen said...

I love RP so much that your app was one of the main reasons for me getting an iPhone.
A couple of questions though:
Any plans to add the ability to log in as an RP user so as to be able to leave comments?
Also, would you expect the app to be able to stream over to Edge network - keeps breaking up for me after playing for about 5 secs.

Mostly Torn said...

Hugoallen,

Have you tried using the 24K stream? That's the best option if you have an Edge connection. With the latest update the quality isn't too bad either (assuming you are running 2.2 or later of iPhone OS). It's obviously not going to be as good as the 64K AAC+ stream, but it is listenable.

To choose the 24K stream, simply tap on the 24K section of the bar on the bottom of the main screen. 24K is pretty much the lowest bitrate usable while still having something that sounds half-way decent. If that still breaks up for you with your Edge connection, unfortunately there's not much else I can suggest.

As for being able to log into the RP web site via the app, Bill (the owner of RP) is currently working on that feature.

Thanks for the feedback!

Steve said...

I had RP the 1st version running on my iPad Touch for some time. Today the iPad went into recovery mode and in the end the only way I could get it to recover was to do the full automated backup/recovery with an O/S upgrade to 3.1.1. (7E18)

I got RP installed, clicked on it and it came up, and within 1 second exits again.
It is the only app, and I got some 29M storage left. The model is MB376LL.

The O/S being too old for the 2nd gen RP app I'm stuck with this version or I would have had it.

The only for the iPad is to listen to RP. I would really appreciate any help to get this playing again.


All content copyright © 2009  Brian Stormont, unless otherwise noted.   All rights reserved.