As part of background behaviour AIR 3 now supports Background Mode Audio(see<http://www.adobe.com/devnet/air/articles/air3_whatsnew.html>). You can define it using the (UIBackgroundModes key in infoAdditions in app descriptor) see http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyRefere nce/Articles/iPhoneOSKeys.html for how you can define UIBackgroundModes. This will allow your app to run in background if it plays Audio. Still I am not sure if this will work for you as I am uncertain about the review guidelines. (I think if you say UIBackgroundModes Audio your app needs to provide Audio related services.Not sure though!!. Please confirm yourself before taking this approach) . Please note that Audio is the only background mode that AIR 3 supports currently.
I can confirm that defining the UIBackgroundMode for 'audio' allows you to run code while the app is in the background. I have a similar issue I am trying to solve, but with regards to location. I need to be able to receive geolocation updates when the app is active, at the home screen, while in another app and when the screen is turned off. I have gotten it to work with all of the cases except for while the screen is off by defining the UIBackgroundmodes for both 'audio' and 'location'.
To test if code can be run, I have an event listener that gets triggered when the app is deactivated and activated. I am setting a timer the moment the app gets deactivated and incrementing a varaible every 100 milliseconds while the app is inactive. When the app becomes active again I report the number back in a debug textfield. If I press the home button or open another app, the number is accurate to how long the app was inactive for... but as soon as I press the power button to shut the screen off, the number stops incrementing shortly after.
I have seen plenty of native iOS geolocation-based apps get updates while the screen is off, why is this not the case for an AIR iOS app? Is there a workaround for this? Does someone at Adobe need to fix this issue? At this point, I'm not even sure Native Extensions would do the trick...
ANY help would be greatly appreciated.