10-13-2008 01:58 PM
I have an app that is dialing a call in the background. When my app shuts down and pops its screen, the user is left at the call log screen behind it. I would like to shut my app down more cleanly and pop the phone screen behind my app first before I shut mine down so they return to the home screen without the phone screen running in the background.
My first question is if there is like a onShutdown() type of method for Application. I didnt see anything in the API for Application or UiApplication and I didnt see any event listeners that seem to be looking for a similar event. I can handle it through the main screens onClose(), but I was hoping for something at the application level.
Secondly regardless of where in my app the shutdown is handled, is there a way to first close the phone screen behind it after the call has been dissconnected? I would prefer not to background mine and then pop the active screen.
10-14-2008 11:26 AM
The onClose method can be used to perform shutdown actions for your application. There isn't a similar method at the application level.
There is no direct method to close screens of other applications. You could close the screen by using the EventInjector API to inject the escape key into the call log screen. It would need to be in the foreground when the key is injected.