Reputation: 11
I'm planning to develop an app reading data usage from the iPhone like each app internet usage , 3G, WiFi etc. My question is:
V1. Is it possible to keep app running in the background (even when is killed) and collecting a data and sending to the server every 15min?
V2. Is it possible to keep app running in the background (even when is killed) and collecting a data and send the data to the server once is reopen?
There are apps like which have similar functionality:
http://www.mobidia.com/products/takecontrol/
Thanks for your help.
Upvotes: 1
Views: 2486
Reputation: 1064
I don't think you're allowed to do either when the app is in suspended
mode. There is no app code being executed at that state.
When your app is in background
though there is only a limited number of tasks you are allowed to perform.
For more info look here
Upvotes: 2
Reputation: 966
First of all it is not possible to keep your app open if the user force quits, which I believe is what you mean by killed.
As far as background execution goes check out this informative answer: iPhone - Backgrounding to poll for events
In that answer it says you can't make recursive beginBackgroundTask calls, but I've seen a method where you make that call and then start location updates before the task dies. Then immediately shut of location updates and begin another background task. Here is a link to that method
Upvotes: 0