Saturday, August 24, 2013

Force Phoegap app to maintain focus and not go into background

This one actually took me a second to research and find the answer to. I was putting together a beeping stopwatch app for myself and wanted the app to remain in the foreground but, after about 60 seconds, the app kept going into the background.

Finally, I stumbled on a stackoverflow conversation. Without further ado...

Add the following line to your didFinishLaunchingWithOptions in AppDelegate:
[UIApplication sharedApplication].idleTimerDisabled = YES;


No comments:

Post a Comment