1110
1110

Reputation: 6829

How to constantly check GPS Signal strength

I want to display GPS Signal Strength in the form of image like:
enter image description here
But I can't find any documentation about this or example.
I have tried this:

if (self.locationManager.location.horizontalAccuracy < 0)
        {
            ...@"No"];
        }
        else if (self.locationManager.location.horizontalAccuracy > 163)
        {
            ...@"Poor"];
        }
        else if (self.locationManager.location.horizontalAccuracy > 48)
        {
            ...@"Average"];
        }
        else
        {
            ...Full
        }

But it seams that this code does nothing.
How can I monitor GPS signal strength, is it possible?

Upvotes: 1

Views: 1952

Answers (1)

Alex
Alex

Reputation: 8991

Where is this code located? Your code should be in the delegate callback:

- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
       fromLocation:(CLLocation *)oldLocation

or iOS 6.0 and above:

- (void)locationManager:(CLLocationManager *)manager
 didUpdateLocations:(NSArray *)locations

Upvotes: 2

Related Questions