Context :
I want to try to work with Geolocation into device for react-native project
Issue :
cannot read property 'getCurrentPosition' with 2 differents react-native library
with :
import Geolocation from 'react-native-geolocation-service'
Geolocation.getCurrentPosition()
or with :
import Geolocation from '@react-native-community/geolocation'
Geolocation.getCurrentPosition(info => console.log(info))
Impossible to get Position into Android device (but ok into browser web)
What is the best official library for working with geolocation into react native ?
Needs 2 base code ? One for iOS other for Android ?
Just 1 library can work into iOS and Android ?
Why I can't 'getCurrentPosition' ?
As you are using Expo, use the Geolocation package optimized for Expo ecosystem - https://docs.expo.dev/versions/latest/sdk/location/