i am starting GPS and then kept it on and make phone call within application using openUrl and then come back to application again and try to stop that GPS by calling stopUpatingLocation but GPS didn’t stop.
Please give some solution to stop GPS.
Code
app.locationManager.delegate=app;
[app.locationManager startMonitoringSignificantLocationChanges];
[app.locationManager startUpdatingLocation]; //start gps
then call hangup using code [[UIApplication sharedApplication] tel:@"number"];
**Now after call hangup i need to stop that gps .... i have already written code below**
[app.locationManager stopMonitoringSignificantLocationChanges];
[app.locationManager stopUpdatingLocation];
app.locationManager=nil;
[app.locationManager release];
Thanks in advance
I guess just make a release for the location manager object.also make it a nil.
example::
write these two lines in your dealloc.
Hope it helps