How to get Geolocation in React Native?

Amit Agrawal
Amit Agrawal

Posted On: Feb 22, 2018

 

The geolocation API extends the web spec of the geolocation. In android, the Geolocation uses android.location.API.

The following alternative libraries are used to include new Location Services API with the React Native.

  • React-native-geolocation-service
  • React-native-location

To request location access, the following code needs to be included inside the application’s AndroidManifest.xml file.

<uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION”/>


    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    React Native Interview Questions

    Explain What is React Native?

    React Native is a mobile app development platform that allows you to create android and ios apps only using Javascript. Re..

    React Native Interview Questions

    Can we combine native ios or android code in React Native.

    Yes, we can. React Native smoothly combines the components written in Objective-C, Java, or Swift...

    React Native Interview Questions

    Who uses React Native?

    Thousands of apps are created using React Native. Here is the list of some popular companies who are using React Native..