I'm trying to get location on a device that does not have google play services (Model is TC56) but it does not work. I'm forcing the usage of the Location Manager.
Expected behavior
Expected to get the location
Reproduction steps
Get a device with no google services
Create a quick example project with this plugin on
Run the following code at any point
final Geolocator _geo = Geolocator();
_geo.forceAndroidLocationManager = true;
try{
Position position = await _geo.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
return position;
}catch(e){
throw(e.toString());
}
Nothing will happen. Following debug points the call stops right here:
final Map<dynamic, dynamic> positionMap = await _methodChannel.invokeMethod('getCurrentPosition', Codec.encodeLocationOptions(locationOptions));
inside the getCurrentPosition method
Configuration
flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, v1.10.7, on Mac OS X 10.14.3 18D109, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
[✓] Android Studio (version 3.2)
[✓] VS Code (version 1.38.1)
[✓] Connected device (2 available)
• No issues found!
🐛 Bug Report
I'm trying to get location on a device that does not have google play services (Model is TC56) but it does not work. I'm forcing the usage of the Location Manager.
Expected behavior
Expected to get the location
Reproduction steps
final Map<dynamic, dynamic> positionMap = await _methodChannel.invokeMethod('getCurrentPosition', Codec.encodeLocationOptions(locationOptions));
inside the getCurrentPosition method
Configuration
flutter doctor:
plugins inside the project:
Version: ^5.1.4+1
Platform: