is it possible on newest ios to make a tracking app wake up every x minutes in order to send the stored locations to an url, even if the user is not moving?
Requested functions of the app are:
App is getting locations based on distance filter (example: only get coordinate via gps, when user has moved more than 10 meters.
App is not allowed to send every new position immediately to url
App should store all new locations of the last 3 minutes
App should send stored positions (of the last 3 minutes) in an interval of 3 minutes. (! Even if user has not moved since a while, app shall connect to url.
App is mainly running in backround.
Example case: User has moved more than 10 meters at 9:00:11 to position 53.432, 13.245, at 9:01:20 to position 53.235, 13.435 and at 9:03:10 to position 54.002, 13.768. No more movement of more than 10 meters before 9:15:00. So from 9:00:00 until 9:15:00 device has located 3 coordinates. Order from server is: Send all locations in an interval of 3 min., starting from 9:00:00.
Requested result is: At 9:03:00 app sends all positions from 9:00:00 until 9:03:00: 9:00:11: 53.432, 13.245, 9:01:20: 53.235, 13.435
At 9:06:00 app sends all positions from 9:03:00 until 9:06:00: 9:03:10: 54.002, 13.768
At 9:09:00 app sends all positions from 9:06:00 until 9:09:00: „no new positions“....
Problem is: App has to be waken up, in order to process actions like sending informations to the server. One event, that could wake up the app would be a movement of more than 10 meters. But since user is not moving from 9:03:10 until 9:15:00, there is no event that wakes up the app. App stays suspended and will not send the location of 9:03:10 before next movement at 9:15:00
Solution? Are there other possibilities to make the app wake up and send stored locations at 9:06:00? Can apps have an internal timer to wake up?
(According to my understanding a timer app is not waking up, when the alert sound should be given. Instead it is scheduling a local notification to fire at the time of the alert.)
But if it is possible to schedule local notifications, can´t an app schedule other actions like „wake me up“?
Thanks a lot for your time and help!