I'm writing an app that sometimes needs to run in background ( something like a navigator, if navigation is active it should go on while if it's not it should be suspended ); how can I force force the application state after user clicks home ? ( suspended or executing in background )
Asked
Active
Viewed 531 times
1 Answers
0
You can try this:
exit(0);
At the application delegate state, either the background one, the foreground or whichever is most suitable for your case.

MCKapur
- 9,127
- 9
- 58
- 101
-
ok, but this crashes the app, i wanted to simply suspends it. – atrebbi Aug 28 '12 at 08:10
-
Check out this link: http://stackoverflow.com/questions/5360846/suspend-the-application – MCKapur Aug 28 '12 at 08:34