Reputation: 241
I have noticed that after running my app and then pressing the hold button the app runs for at least 5 minutes in the i guess inactive foreground state? I have a timer that refreshes data in the app which make the phone make a noise when this happens! I have already disable the app from running in the background via the plist. wondering where best to tackle my issue from? thanx.
Upvotes: 0
Views: 148
Reputation: 58448
When the screen is locked with the app in the foreground, the app is placed into foreground inactive state, as you assumed.
However, as soon as the screen locks, WiFi is turned off, to save battery. If any networking is in progress at this time it will be disconnected, and fall back to 3G/4G until a short time passes. It could be around 5 minutes. After that the phone will sleep, causing your app to be sent to the background.
When the phone is unlocked, the app will be brought back to the foreground again.
Upvotes: 1