michalchudziak / react-native-geolocation

Geolocation APIs for React Native
MIT License
1.31k stars 228 forks source link

fix: when using playServices provider the getCurrentPosition error callback is never called #302

Closed ekbaumgarten closed 2 months ago

ekbaumgarten commented 7 months ago

When using playServices provider the getCurrentPosition error callback is never called

Overview

In Android platform, when you are using the playServices as location provider and any error occurs in checkLocationSettings phase, it always emits the geolocationError event, which is only listenned by the watchPosition feature. So, when you are using the getCurrentPosition feature, the error callback is never being called.

Test Plan

Using the example project in this repository, do the following:

  1. Turn off the device location (GPS)
  2. Select playServices as the location provider
  3. Go to Examples screen and click on the getCurrentPosition button.
  4. A GetCurrentPosition Error alert will be shown.
generosocarbone commented 5 months ago

Any news on this?