React Native Geolocation Service screenshot

React Native Geolocation Service

Author Avatar Theme by Agontuk
Updated: 8 Oct 2022
1638 Stars

React native geolocation service for iOS and android

Categories

Overview

The react-native-geolocation-service is a library created to address the location timeout issue on Android with the current implementation of Geolocation API in React Native. It leverages Google Play Service’s FusedLocationProviderClient API and automatically selects the appropriate provider based on the request configuration. This library aims to provide a seamless solution for managing geolocation services in both iOS and Android platforms.

Features

  • Fix Location Timeout Issue: Resolves the timeout problem on Android devices by utilizing Google Play Service’s FusedLocationProviderClient API.
  • Automatic Provider Selection: Automatically chooses the best provider based on the request configuration.
  • Location Mode Prompt: Suggests changing the location mode if it does not meet the specified request configuration.
  • Compatibility: Works with React Native versions >=0.60 for Package Version >=3.0.0.

Installation

To install the react-native-geolocation-service, you can use yarn or npm. For yarn:

yarn add react-native-geolocation-service

For npm:

npm install react-native-geolocation-service

For detailed setup instructions, refer to the documentation’s setup.md file.

Summary

The react-native-geolocation-service is a valuable library for React Native developers facing issues with geolocation services, particularly on Android devices. By leveraging Google Play Service’s FusedLocationProviderClient API, this library offers a reliable solution to manage location requests seamlessly. With straightforward usage instructions and compatibility with newer React Native versions, it provides a convenient drop-in replacement for the default Geolocation API in React Native applications.