How hard would be to add proper multitasking support (I press the home button and the App instead of restart from scratch, go in a pause state (just like when you launch a Plus+ or OpenFeint dashboard from Unity).
Isn’t enough to write the applicationDidEnterBackground method similar to applicationWillResignActive existing one ?
I will try this later today.
Anybody can tell his experience with this on a multitasking device with Unity ?
did enter background / foreground can not be forwarded into the engine as you likely know if you read the iOS4 guidelines. the application is not given processing time within these, they are just for “instant handling” like firing off a schedule or notification, thats it.
Unity handles the going to sleep / coming back already the way its meant to be done with resign / become active and does so through using OnApplicationPause(bool pause) actually.
these will be fired off in any case the app gets paused for whatever reason (going into background, phone call, notification, …) and you should respond to this one to be iOS compliant
It’s a pity that loosing the focus for a “20% battery” warning notifications message (or any other focus loss) make still the App loosing the audio background.
The problem with OnApplicationPause( ) is the fact that it will be called whenever you recieve a phone call or when you put time.TimeScale = 0 and stuff like that. So if you are planning to do stuff like, I don’t schedule localnotifications OnApplicationPause( ) will be useless !