flutter-geolocator icon indicating copy to clipboard operation
flutter-geolocator copied to clipboard

Taking so long and on some API not returning location on only Android

Open ghost opened this issue 7 years ago • 6 comments

HI, on iOS there is no problems. But on Android it takes over 15 seconds to get current location. Also, API28 not even returning location info. Any workaround? Thank you

ghost avatar Jan 01 '19 17:01 ghost

The same problem, it takes about 30-40 seconds on API 27. In older device (Android ~5) it works much faster.

VladimirCourse avatar Jan 17 '19 15:01 VladimirCourse

Out of interest if it's slow, and you force it not to use the fusedprovider, is it any better ? Eg

Geolocator geolocator = Geolocator()..forceAndroidLocationManager = true;

ibrierley avatar Jan 17 '19 15:01 ibrierley

Out of interest if it's slow, and you force it not to use the fusedprovider, is it any better ? Eg

Geolocator geolocator = Geolocator()..forceAndroidLocationManager = true;

With this it's not working at all, just infinite awaiting of location.

VladimirCourse avatar Jan 17 '19 15:01 VladimirCourse

.forceAndroidLocationManager = true; fixed it for me. On emulator, I don't have the physical device yet.

kika avatar Jan 26 '19 20:01 kika

I have had one user who have reported an issue with it never getting a GPS fix. I've given them the ability to also use forceAndroidLocationManager, but this doesn't resolve the issue. They are using a Samsung Galaxy Core Prime which even the user admitted was an old phone. Any ways around this?

mulderpf avatar Mar 01 '19 21:03 mulderpf

Most issues with locations not being fetched are solved in version 6.0.0. However certain phones did not implement the Android specifications correctly and will keep on returning location information slow. An excellent troubleshooting guide can be found here: #507

mvanbeusekom avatar Sep 04 '20 16:09 mvanbeusekom