Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we launch setting screen any no of time in iPhone to enable the GPS?

I have tried the launch the settings of iPhone in my application using the call

CLLocationManager *locationManager = [[CLLocationManager alloc] init];
    locationManager.delegate = self;
[locationManager startUpdatingLocation];
[locationManager release];

but I was able to launch only once,now I am not able to launch the settings in my application. I am using iPhone 3GS with iOS 4.2

Is there any other way to launch settings any no of time if the location services are off.


1 Answers

but I was able to launch only once,now I am not

If you saw an alert kind of msg on your app asking for your permission for using yous gps location. Then this is the default behavior of iPhone OS. if you try to get gps location in any app the OS ask for user's permission. You can not launch this alert again!

but if you wants to change the setting (means wants to enable or disable the location tracking) then you can open the "Settings" application and look for location services setting. You can find your app there and disable the location tracking. But remember you can not open the "Settings" app using your app.

like image 183
Saurabh Avatar answered Jan 21 '26 08:01

Saurabh