2
votes

I am new to location based applications. My requirement is, device has to show the location based notifications when the user reaches the selected region. I implemented perfectly. This app is working on background also. Now my new requirement is, device has to show the location based notifications even after kill the app. [I saw a couple of iPhone apps working with this functionality. The apps are "Reminder" & "Locationizer" ] .

Can you please check my implementations steps as follows.

  • Launch the application.
  • Selected the location alert button.
  • Called the following CLLocationManager API's to monitor my region.

    [locationManager startMonitoringForRegion:@"MyRegion" desiredAccuracy:kCLLocationAccuracyBest]; [locationManager startMonitoringSignificantLocationChanges];

  • Quit the app [Running in background].

  • I am getting location based alert notifications properly.

Here the new requirement.

  • Launch the application.
  • Selected the location alert Button.
  • Called the following CLLocationManager API's to monitor my region.

    [locationManager startMonitoringForRegion:@"MyRegion" desiredAccuracy:kCLLocationAccuracyBest]; [locationManager startMonitoringSignificantLocationChanges];

  • Kill the app. [now application is not running in background]

  • App should show the location based notification when user reach the location.

How do I implement this logic?

2

2 Answers

1
votes

Hi Friends I found solution for this issue.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

id locationValue = [launchOptions objectForKey:UIApplicationLaunchOptionsLocationKey];
if (locationValue)
{
      [self initLocationMonitoring]; // this will invoke CLLocationManager
}

return YES;
}
0
votes

An app that is quitted cant perform any functioning...so i will suggest to recheck those apps ..they must be functioning in the background to check the location of the device...they won't be able to alert if they are quitted.