React Native Bluedot Point SDK Wrapper

Bluedot React Native is a wrapper around the Android Point SDK and iOS Point SDK, allowing for Bluedot integration in React Native apps. 

Functionality is provided through one single npm package so you can use it for both platforms without downloading any extra packages.

See the full documentation or get the Bluedot React Native library on npm here.

All Projects, Zones and Geofences configurations can be done through our Canvas dashboard.

 

import BluedotPointSdk from 'bluedot-react-native';
 
componentDidMount = async () => {
 // Before starting the Bluedot Point SDK ask for Location Permissions
 
 // ...
 
 const channelId = 'Bluedot React Native'
 const channelName = 'Bluedot React Native'
 const title = 'Bluedot Foreground Service'
 const content = "This app is running a foreground service using location services"
 
 // Foreground Service for Android to improve trigger rate - iOS will ignore this.
 BluedotPointSdk.setForegroundNotification(channelId, channelName, title, content, true)
 
 // If you would like to add custom event meta data
 BluedotPointSdk.setCustomEventMetaData({ userId: 'user_id_goes_here' })
 
 // Start Bluedot SDK
 BluedotPointSdk.authenticate('your_application_api_key', '<Always|WhileInUse>', () => console.log("On success"), () => console.log("On fail"))
 
 BluedotPointSdk.on('zoneInfoUpdate', (event) => {
 // ...
 })
 
 BluedotPointSdk.on('checkedIntoFence', (event) => {
 // ...
 })
 
 BluedotPointSdk.on('checkedOutFromFence', (event) => {
 // ...
 })
 
 BluedotPointSdk.on('checkedIntoBeacon', (event) => {
 // ...
 })
 
 BluedotPointSdk.on('checkedOutFromBeacon', (event) => {
 // ...
 })
 
 BluedotPointSdk.on('startRequiringUserInterventionForBluetooth', (event) => {
 // ...
 })
 
 BluedotPointSdk.on('stopRequiringUserInterventionForBluetooth', (event) => {
 // ...
 })
 
 BluedotPointSdk.on('startRequiringUserInterventionForLocationServices', (event) => {
 // ...
 })
 
 BluedotPointSdk.on('stopRequiringUserInterventionForLocationServices', (event) => {
 // ...
 })
 }
Created by Melwin Chiramel on December 16, 2019