Ferdinand
Ferdinand

Reputation: 1193

How to detect whether GPS signal is weak or high?

How to detect GPS signal strength such as low (weak) or high ?

is there an API class ?

Thanks in advance.

Upvotes: 8

Views: 3925

Answers (3)

OverdoseB12
OverdoseB12

Reputation: 1153

The Package geolocator from pub.dev is needed.

Function to get LocationAccuracyStatus:

getLocationAccuracy() async {
    LocationAccuracyStatus accuracyStatus =
        await Geolocator.getLocationAccuracy();
    if (accuracyStatus == LocationAccuracyStatus.reduced ||
        accuracyStatus == LocationAccuracyStatus.unknown) {
      //Bad Signal
    } else {
      //Good Signal
    }
  }

Upvotes: 0

prepbgg
prepbgg

Reputation: 3652

The getAccuracy() method of the Location object returned by onLocationChanged provides a good indication of how good the "fix" is.

Upvotes: 3

user181351
user181351

Reputation:

GpsStatus. getSatellites();
//for each of those do 
GpsSatelite. getSnr();
//that ruturns the signal to noise ratio
//use with
GpsStatus.Listener

Heres the api docs: Location manager - GpsStatus - GpsSatelite

Upvotes: 5

Related Questions