Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iphone significant location event not related to cell change

Tags:

ios

iphone

i have been using the significant event location manager on ios, but it seems it does not based on cell change as claimed.

i used a simple application utilising significant location event, but i could not get a repeatable, consistent or sensitive response from the ios sdk.

i plotted the route (blue line), the cell towers(place mark) and a 1000m2 grid(blue square) on the map below. map showing route

the route was 5000m in distance.

i drove it 3 times.

  • test1. received 2 sig events
  • test2. none
  • test3. received 1 sig events

before u complain that my test is too small, i have been monitoring other test routes for days and all show the inconsistent shape.

i was expecting the sig event to be based on cell tower switching. so i used a jailbreak app called 'signal' to identify what is the active cell. (NB.it is surprising which cell is active. Not what i would expect.)

From monitoring the 'signal' application, the cells switched around 6-7 times from what i noticed.

yet i did not received 6-7 sig events. So i cant see any correlation between cell switching and significant events.

so i have the following questions

  • Q1. what is the significant event trigger?
  • Q2. why are the result unreliable/inconsistent.
  • Q3. how can i get make my app receive consistent and sensitive significant event to 500m?

This is the code that is running in the test app

 -(void)initLocationManager {
     if (locationManager == nil) {
         self.locationManager = [[[CLLocationManager alloc] init] autorelease];
         locationManager.delegate = self;
         locationManager.desiredAccuracy = kCLLocationAccuracyBest;
         [locationManager startUpdatingLocation];
         [locationManager stopUpdatingLocation];
         [locationManager startMonitoringSignificantLocationChanges];

     }
 }
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [self initLocationManager];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;
}

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation
  fromLocation:(CLLocation *)oldLocation {
     NSLog(@"%@", newLocation);
     [[NSNotificationCenter defaultCenter]
 postNotificationName:@"PositionUpdate" object:nil];
 }

-lp

like image 510
lpic Avatar asked Jun 16 '11 22:06

lpic


People also ask

Can significant locations be wrong on iPhone?

Yes. The significant locations can be wrong if your iPhone is not updated to the latest version or if your phone is not updating the location periodically. You can fix it by switching off the phone and turning it on again.

What makes a location significant on iPhone?

iPhone Significant Locations is a feature that tracks and saves the places you're located most often. Apple uses these locations to send you specific alerts in the Calendar, Maps, and Photos app. Although your iPhone saves these Significant Locations, Apple can't see or read them because the data is encrypted.

Why is my significant location not updating?

If your issue of Significant Locations not working on iPhone hasn't been fixed yet, you can try updating your iOS on your device. Go to Settings > General > Software Update. Tap Automatic Updates and then toggle on Download iOS Updates. Turn on Install iOS Updates.

Why did Apple change significant locations?

The significant-change location service offers a more power-friendly alternative for apps that need location data but don't need frequent updates or the precision of GPS. The service relies on lower-power alternatives (such as Wi-Fi and cellular information) to determine the user's location.


2 Answers

Significant Location changes are determined by iOS and there is nothing you can do to change their granularity directly. Note that it's only in iOS 4 that only the cell tower locations are used. Future versions of the operating system will improve this.

But as a workaround you could switch on normal CoreLocation position updates when the app get's woken/started by a significant location change. And then once you have the perfect result, disable Location Monitoring again to allow the app to go back to hibernation.

like image 184
Cocoanetics Avatar answered Sep 22 '22 20:09

Cocoanetics


I just did a 3 kilometer test walk in fairly-central San Francisco with my app, and got zero Significant Change location events as well. I have a toggle in my app to change to normal polling with kCLLocationAccuracyHundredMeters and got 40+ events over the same distance.

Echoing the sentiments of various other answers herein and elsewhere, I'm holding off on Significant Change until iOS 5. I think the best thing to do right now is roll-your-own business logic to poll the old Core Location way, and ratchet frequency down gradually over time (or something) to be battery friendly.

Seems like in iOS 4, Significant Change is better suited for being able to tell which end of your commute you're at than which block (or even zip code) you're on.

like image 31
Eric G Avatar answered Sep 24 '22 20:09

Eric G