StartMonitoringSignificantLocationChanges in iOS 4 question with MonoTouch (iPhone, iPad, iPod touch) - More Wally - Wallace B. McClure
in

MoreWally.com

Giving people what they want, More Wally. This is the technical and personal blog site of
Wallace B. (Wally) McClure.

This Blog

Syndication

News

Please goy buy 3-4 copies of my book on MonoTouch titled "Professional Android Programming with Mono for Android for .NET/C# Developers." They make great gifts all year round. Plus, I get about $.25 when you buy a copy.

Technical Sites

More Wally - Wallace B. McClure

This blog will have all kinds of posts about Wally McClure. In it, there will be tons of .NET and computer programming posts as well as Wally's views on life in general. As you might guess, this site and blog help you get More Wally in your life. What more could anyone want? iPhone, Android, MonoTouch, MonoDroid, Mobile, HTML5, .NET, ADO.NET, ASP.NET, AJAX, jQuery, jQuery Mobile, ASP.NET AJAX, and Windows Azure............follow me on twitter at Wally

StartMonitoringSignificantLocationChanges in iOS 4 question with MonoTouch (iPhone, iPad, iPod touch)

I got a question on Twitter the other day about why I am using the StartMonitoringSignificantLocationChanges() feature of the CLLocationManager.  I think this link on Apple's Developer site describes why this is significant.  The important text for me is:

Applications can register for significant location changes only. (Recommended) The significant-change location service is available in iOS 4 and later for devices with a cellular radio. It offers a low-power way to receive location data and is highly recommended. New location updates are provided only when the user’s position changes significantly. If the application is suspended while running this service, new location updates will cause the application to be woken up in the background to handle them. Similarly, if the application is terminated while running this service, the system relaunches the application automatically when new location data becomes available.

The key parts are:

  • This is the recommended way to handle changes in the background.
  • It only works in iOS 4 and later for devices with a cellular radio, so it will only work on the iPhone and 3g iPad (once it gets iOS 4).  This means that I have to continually borrow my wife's iPhone, which results in some looks of "wtf do you want with it now."
  • The user position changes significantly.  I think that this is a big deal.  The event that you wire up does not go banging on the GPS in the device.  That will help with power, though it won't be the same as if it is not using any power.  Its better than the alternative of using more power.

Comments

No Comments
2006 - Wallace B. McClure
Powered by Community Server (Non-Commercial Edition), by Telligent Systems