This is a hard one. I toggle airplane mode a dozen times a day and want a fast way to do it. I'm the rare user who would kill for a physical button dedicated to airplane mode. I'd like to try and do it with the down-volume button. This won't be on the app store and I'm happy (and indeed it will be necessary I think) to use some private libraries. In fact, it may turn out that I need to jailbreak the phone. I'm looking for general architecture advice at this stage, not specific code (although that never hurts).
So the question is: what's the best architecture for approaching this problem? I break down the problem this way:
1) How to keep the app running in the background so it can listen for and respond to volume button presses (and perhaps down-volume events from remotecontrol devices). I've got three choices here: --create a VOIP app --create a navigation app --create a audio app An audio app seems the most reasonable way. Am I going to have to continuously play a silent track on repeat to keep my app alive in the background? It seems like I'll have problems with the app going dead if I play an audio track from another app.
2) How to intercept to volume-down events. One answer to this issue: program access to iPhone volume buttons
3) How to check the airplane status and change it. An old answer to this issue with some Mach code and dynamic linking I don't understand: http://blogs.oreilly.com/iphone/2009/01/bring-airplane-mode-control-ba.html
The best resource for understanding the private libraries seems to be here: http://theiphonewiki.com/wiki/index.php?title=/System/Library/Frameworks
Any suggestions for better private library "docs" or an update to the "iPhone Open Application Development" book by Zdziarski would be welcome.
Thanks for thinking about this with me!