View Single Post
  #77  
Old April 21st 17, 01:39 PM posted to rec.aviation.soaring
Bruce Hoult
external usenet poster
 
Posts: 961
Default Improved live tracking for the SSA membership?

On Friday, April 21, 2017 at 2:00:27 AM UTC+3, Sean Fidler wrote:
iPhones and the iPhone "app" seem to be a little less capable/reliable in general.


iPhones have features that try to prevent apps from unnecessarily using CPU, communications etc in the background and draining your battery quickly.

But there are ways for an app to tell the OS "No, I actually do need to do this, it's not just by accident".

Details at: https://developer.apple.com/library/...Execution.html

See, in particular:

- Implementing Long-Running Tasks
- Apps that keep users informed of their location at all times, such as a navigation app and/or
- Apps that need to download and process new content regularly

Apps that implement these services must declare the services they support and use system frameworks to implement the relevant aspects of those services.

In Xcode 5 and later, you declare the background modes your app supports from the Capabilities tab of your project settings. Enabling the Background Modes option adds the UIBackgroundModes key to your app’s Info.plist file. Selecting one or more checkboxes adds the corresponding background mode values to that key.

More information at: https://developer.apple.com/library/...009497-CH2-SW1

I'm currently working for Samsung and haven't written iOS code for a few years, but I found this information in about two minutes, so you'd hope any competent iOS developer would be able to as well.

Reading on ...

Deferring Location Updates While Your App Is in the Background

https://developer.apple.com/library/...09497-CH2-SW14

This is interesting. Your app can tell iOS to record the user's movements, but only wake the app after a certain distance has been travelled, or a certain time has elapsed. The OS will then wake your app and give it all the information that was gathered in the meantime.

With suitable tuning you could use this to get frequent updates while the glider is flying at high speed, but less frequent while thermaling in one place. The end result on the map could be as detailed as you want, but with a number of location points arriving at the same time (every 15 or 30 seconds maybe).

Or course a good app should accumulate location fixes if internet connectivity is lost, and then send them all together when there is signal again.

None of this is difficult to do.