Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a "return to app" status bar when app goes to the background?

When my app moves to the background while either playing audio or recording audio, I would like to provide something like the the green "In Call" status bar that appears when you are in a call and swap out to another app, giving you a quick "return to app" capability.

I thought this might be a private API, but I noticed the Griffin iTalk app does this when it is recording audio (see picture) - so I know it can be done, but I have not been able to figure out what the API is (the Info.plist setting, the AVAudioSession, the UIApplication/Delegate or the whatever) to make this magic happen. My app is currently working and recording audio in the background and works just fine, I assume there is some bit somewhere I'm not setting to get this behavior.

Can someone either point me to the right docs or sample code that exhibits this behavior? (I've scoured the Audio docs and haven't been able to find it).

Thanks!

alt text

like image 708
Eric Avatar asked Dec 01 '10 01:12

Eric


2 Answers

There may be a private API to do this, but if you want to get into the App Store, the thing to do is to register as a VOIP app, which gets you the in-call status bar, like Skype or (I imagine) iTalk.

like image 101
Jeff Kelley Avatar answered Nov 15 '22 10:11

Jeff Kelley


Actually the red-bar actually only appears when the application is recording audio in the background. I've only ever done this when marking the application VOIP and Audio.

You may be able to do this by only marking is as background Audio application only, but I haven't tried this.

like image 37
Shane Powell Avatar answered Nov 15 '22 10:11

Shane Powell