Reputation: 1193
How to detect GPS signal strength such as low (weak) or high ?
is there an API class ?
Thanks in advance.
Upvotes: 8
Views: 3925
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
Reputation: 3652
The getAccuracy()
method of the Location object returned by onLocationChanged
provides a good indication of how good the "fix" is.
Upvotes: 3
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