Hemisphere Games Banner

App switching and graceful music handling in iOS

We post few dev/technical pieces on our blog (I’d love to do more), but we ran into an issue recently that seems to plague many iOS apps on the store: Music not always playing on app resume. It’s not catastrophic when it happens – and can often be fixed by hitting the home button and trying again – but it is annoying.

It may be OpenAL related, but we’re not entirely sure to be honest. (Many more games use OpenAL than we thought at first. Apparently the list includes Angry Birds, Cut the Rope, Flight Control, Bumpy Road, Bit Pilot, Flower Garden, etc.) At first we thought we had a bug in Osmos, but on testing other apps we discovered it’s a fairly widespread issue.

To reproduce it, try switching back and forth (by double-tapping on the Home button) between the current store versions of Flight Control and Flower Garden. After a couple of swaps you’ll find that music in Flight Control often doesn’t resume. Depending on which pair of apps you choose to test you’ll end up with slightly different results — like an extra-complex game of rock-paper-scissors. (Angry Birds Space has impeccable manners though. It always recovers gracefully, and any app that comes after recovers nicely as well. I knew there was a reason behind Rovio’s success!)

So what’s going on here? Well, on startup/resume most apps will check to see if other audio is playing (eg. music or a podcast in iTunes) via a call like


If audioIsAlreadyPlaying turns out to be true, polite games will refrain from playing their own music. Sometimes, however, audioIsAlreadyPlaying appears to be true even when it shouldn’t be. Why? It seems to be a timing issue. (Warning: speculation.) It may be that the previous app hasn’t “finished” moving to the background when the new app takes over, giving the new app a temporarily misleading view of the situation.

The solution? (Thanks to Eric Johnson of Semi Secret Software for this tip!) Keep re-polling the status of kAudioSessionProperty_OtherAudioIsPlaying every couple seconds after starting up. Trying a few times over the course of 10 seconds or so ought to do it! We did this for Osmos, and it’s recovering very reliably now.

Multiplayer is coming…

Wanted, Dead or Alive

Humble Android Bundle

Some of our Android fans may remember us mysteriously mentioning that there’s “more good news coming!” Well, the good news has landed, and she’s a beauty: a Humble Bundle dedicated to Android! (Though Win/Mac/Linux is included of course.)

We’d also like to thank Mat Jarvis (aka High Skies) for allowing us to include his Sounds of Earth mini-album in the bundle!

I don’t think we really need to say more — other than go get that Android Bundle — and rejoice! :)

Osmos now available on Android

We’re delighted to announce the Android version of Osmos is now available on the Android Market!


“Must — consume — all — motes!”
This lil’ guy is already in the Osmos spirit.

To celebrate the launch, Osmos on Android is 40% off ($2.99) for the first week!

Get the full version here.

Get the demo version here.

Osmos runs on all Android tablets and most modern phones running Android 2.2 (Froyo) or later. Don’t worry: if your device doesn’t meet these requirements, you shouldn’t be able to purchase Osmos on the Market. There are lots of different Android devices out there; please feel free to let us know how the game is running for you!

Big thank you and congratulations to the fine team at Apportable for their hard work on the port. They’ve done a fabulous job, and we’re so pleased Osmos can now be enjoyed on Android devices.

Thank you also to all the fans of Osmos, and to the Android supporters who have cheered us on during the port. Stay tuned for an upcoming series of Android-related blog posts covering Apportable’s tech and our experiences with the port and Android ecosystem.

‘Droids: commence Osmoting! :)