iOS SDK 15.6.7,
Android SDK 15.5.3,
Hello Screen Dynamic States,
Bluedot Cordova plugin 4.0.1,
Bluedot Xamarin Android wrapper 15.5.2,
Bluedot Xamarin iOS wrapper 15.6.6,
Bluedot React Native wrapper 2.3.0,
This wrapper includes the basic functionality of our SDK. We’ve open-sourced the code of this wrapper in case you’d like to expand it and implement your methods or logic.
If you have any suggestions for expanding functionality or would like our team to review your implementation, please contact our engineering support team – help@bluedot.io
In the root directory of your project run $ npm install bluedot-react-native --save
.
1. Within the ios
directory run the following commands:
$ cd ios $ brew install git-lfs $ git lfs install $ pod install
2. Setup your info.plist
file as laid out on this documentation page.
1. Include Jitpack in your Maven dependencies in build.gradle
allprojects { repositories { ... // ADD IT HERE maven { url "https://jitpack.io" } } }
2. Make sure Jetify is available in your development environment
$ npx jetify
import BluedotPointSdk from 'bluedot-react-native'; class App extends React.Component() { 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_project_id', '<Always | WhileInUse>', () => console.log("On success"), () => console.log("On fail") ) // Register the events listeners 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) => { // ... }) // Tempo Methods BluedotPoinstSdk.startTempoTracking( '_destination_id_goes_here_', (error) => console.error('Start Tempo trackin error callback', error) ) BluedotPointSdk.stopTempoTracking() // Tempo events BluedotPointSdk.on('tempoStarted', () => { // ... }) BluedotPointSdk.on('tempoStopped', () => { // ... }) BluedotPointSdk.on('tempoStartError', (error) => { // ... }) // Get Installation Reference. try { const installRef = await BluedotPointSdk.getInstallRef() console.log(installRef) } catch (error) { console.error(error) } // Check if the Bluedot SDK is already running. try { const isBluedotServiceRunning = await BluedotPointSdk.isBlueDotPointServiceRunning() console.log(isBluedotServiceRunning) } catch (error) { console.error(error) } } }