react-native-geo-fence | Simple React-Native geofencing package | Frontend Framework library
kandi X-RAY | react-native-geo-fence Summary
kandi X-RAY | react-native-geo-fence Summary
Simple React-Native geofencing package
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Starts the list of geofences
- Gets the last known location in the API
- Constructs a geofencing request
- Request permission
- Handle geofencing event
- Maps a transition type
- Get a Geoofence from a key
- Removes geofences
- Log the security exception
- Returns a PendingIntent which can be used to create a PendingIntent for the current location of the request
- Called when a location is changed
- Resolves a location query for the user current location
- Defines the result of the operation that will be added to the activity
- Returns the error string corresponding to a geofencing error code
- Retrieves current user location
- Rebuilds a pending location query promise
- Populate the geofence list
- Builds the Google API client
- Callback when a connection is connected
- Handles a connection failure
- Called when connection suspended is suspended
- Resumes location permission
- Create JS modules
- Creates native JavaScript module
- Create view managers
react-native-geo-fence Key Features
react-native-geo-fence Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-geo-fence
QUESTION
I created a React-Native application Then I created a React-Native Library using this seed github.com/frostney/react-native-create-library
Now, I need to use this package https://github.com/toystars/react-native-geo-fence Inside of the Library.
Problem is: The library is not a react-native application, and the geo-fence lib needs linking.
I cant change the React-Native App and can not use the geo-fence directly inside of it, of course.
The logic will need to stay inside the Library i created.
When i linked the Library i created (with the geo fence package on it already), with the App i created, the geo-fence gradle settings and android configurations didn't happen at the APP.
- this concerns Android only
ANSWER
Answered 2019-Jan-17 at 02:09It is not possible to link a react-native library to another react-native library.
So the correct procedure is to add any third party react-native library, that requires link, that you want to use inside your own react-native library, as peerDependency on package.json.
This way the third party lib will be installed directly at the app, and will be linked, necessarily to the app, but the logic using the third party lib will be inside your own.
So you can create a lib, add react-native-geo-fence as peerDependency of your lib, then code as you wish. After this, the app using your lib, will have to install it and link manually the react-native-geo-fence, then that's it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-geo-fence
Add import com.bmustapha.RNGeofence.RNGeoFencePackage;; to the imports at the top of the file
Add new RNGeoFencePackage() to the list returned by the getPackages() method
Append the following lines to android/settings.gradle: include ':react-native-geo-fence' project(':react-native-geo-fence').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-geo-fence/android')
Insert the following lines inside the dependencies block in android/app/build.gradle: compile project(':react-native-geo-fence') react-native-geo-fence comes bundled with latest play-services as at every release. If you want to use a different version to prevent version conflict, do as below compile(project(':react-native-geo-fence')) { exclude group: 'com.google.android.gms' } compile 'com.google.android.gms:play-services-base:10.2.6' // replace 10.2.6 with your play services version number compile 'com.google.android.gms:play-services-location:10.2.6' // replace 10.2.6 with your play services version number
In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name]
Go to node_modules ➜ react-native-geo-fence and add RNReactNativeGeoFence.xcodeproj
In XCode, in the project navigator, select your project. Add libRNReactNativeGeoFence.a to your project's Build Phases ➜ Link Binary With Libraries
Run your project (Cmd+R)<
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page