michalchudziak / react-native-geolocation

Geolocation APIs for React Native
MIT License
1.27k stars 219 forks source link

Small android improvements #280

Closed msvargas closed 6 months ago

msvargas commented 8 months ago

Overview

  1. On some Android devices I have this crash related to mLocationCallback is null, maybe in some strange scenarios before the user accepts the permissions the stopObserving method is called, it checks if the mLocationCallback is null and skips it.

image (2)

  1. On the other hand, when some devices have airplane mode enabled they cannot get the location but GPS is enabled, I have added a small condition to detect if any provider is available and make the location request.

Test Plan

jkaufman commented 6 months ago

I am seeing the same crash and will be integrating your changes, thank you.

michalchudziak commented 6 months ago

Thanks for this fix! I will ship it in the next release