Open armomu opened 2 years ago
same error The problem only appears when the forceAndroidLocationManager is true
Flutter 2.10.3 Geolocator 8.2.0
Possibly related to #1027 and #1114.
same error The problem only appears when the LocationAccuracy.medium Only a few phones won't get the location It has nothing to do with #1027 or #1114
Same error here as well.
Until a few updates ago, it was working fine but now it doesn't.
And I am not using forceAndroidLocationManager and the precise location is not off.
i have tried using time-limit finally to limit the call otherwise the getCurrentPosition keeps on checking.
Position position;
String latitude = '';
String longitude = '';
try {
position = await Geolocator.getCurrentPosition(
desiredAccuracy: LocationAccuracy.best,
timeLimit: Duration(seconds: 30),
);
latitude = position.latitude.toStringAsFixed(3);
longitude = position.longitude.toStringAsFixed(3);
} catch (e) {
logger.e(e);
return ToastMessage.showEmptyPlaceToast();
}
My device specs: Android 13 both on real device and emulator
🐛 Bug Report
The "getCurrentPosition" method is normal for models below Android 12. Android 12 and some Huawei models report an error "TimeoutException after 0:00:03.000000: Future not completed", but the "getLastKnownPosition" method is normal.
Expected behavior
I/flutter (15995): 获取当前位置出错===TimeoutException after 0:00:03.000000: Future not completed
Reproduction steps
Configuration
Version: 8.2.0
Platform: