'Geolocator forceAndroidLocationManager TimeoutException

When I fetch the user's location using Geolocator package

Geolocator.getCurrentPosition(
          desiredAccuracy: LocationAccuracy.best,
          forceAndroidLocationManager: false,
          timeLimit: const Duration(milliseconds: 5000));

It works without errors, but when forceAndroidLocationManager is set to true it gives always TimeoutException.

i want forceAndroidLocationManager to be true i checked all permissions and service enable Flutter 2.10.4 Geolocator 8.2.0



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source