1.0.2 • Published 5 months ago

react-native-instantpay-location-enabler v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

react-native-instantpay-location-enabler

React Native module for checking Device Location is Enable or Disable. Support only for Android.

TOC

Installation

npm install react-native-instantpay-location-enabler

Manual installation

Android

  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import com.instantpaylocationenabler.InstantpayLocationEnablerPackage; to the imports at the top of the file
  • Add new InstantpayLocationEnablerPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-instantpay-location-enabler'
    project(':react-native-instantpay-location-enabler').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-instantpay-location-enabler/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-instantpay-location-enabler')

Usage

import RNLocationEnabler from 'react-native-instantpay-location-enabler';

// ...

let res = await RNLocationEnabler.checkLocation();

Note about checkLocation Method

Possible options values :

keyDescriptiontyperequired
askDailogPermissionRequest to Open Dialog PermissionbooleanOptional

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Created By Instantpay