04-13-2012 03:01 AM
Anyone experienced this?
The requestClose() got called after exactly one hour of app being in the background.
Solved! Go to Solution.
04-13-2012 03:22 AM
04-13-2012 05:25 AM
04-13-2012 08:50 AM
Indeed, by returning either true or false, the result is the same.
The docs are pretty inconclusive IMHO:
public boolean requestClose()
Individual apps can handle this new API call by cleaning up and then closing themselves, if they so desire. The individual app should return true if it's successful in terminating itself otherwise should return false.
whether the application closed (true) or was sent to the background (false)
Nothing is said about why and when the system would invoke them or what would it use the returning value for.
IMO and tests confirm that (my app was still active in the background), the method signature could have been: void releaseUnnecessaryResourcesIfYouLike().
But why is it called after one hour and then repeatedly every minute... remains a mystery.
Or I am missing an important role intended for it?
In short, if I don't have anything to release, my app shouldn't implement that method.
04-13-2012 09:06 AM
04-13-2012 04:26 PM
This method is used to notify applications that are in the background. If an application has been deactivated for 1 hour it requests that it close. This can be useful for applications that don't execute any background tasks. The application may refuse to close (which is the default behaviour of requestClose()).
04-16-2012 02:35 AM
04-16-2012 02:55 AM
04-16-2012 03:41 AM