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,
BluedotPointSdk.authenticate( "your_applicationId", "Location permissions <Always | WhileInUse>", () => console.log("Success callback"), () => console.error("Error callback") );
BluedotPointSdk.initialize( "your_projectId", () => console.log("Success callback"), () => console.log("Error callback") );
// Async / Await const isBluedotSdkInitialized = await BluedotPointSdk.isInialized() // Promise BluedotPointSdk.isInitialized() .then((isInitialized) => console.log("Is the SDK initialized?", isInitialized);
import { Button } from 'react-native' import BluedotPointSdk from 'bluedot-react-native' export default function App() { // The SDK needs be initialized and the app must have location permissions. const geoTriggeringService = new BluedotPointSdk.GeoTriggeringBuilder() function handleStartGeoTriggering() { geoTriggeringService.start( () => console.log("On Success Callback"), () => console.error("On Error Callback"), ) } return <Button title="Start Geo-Triggering" onPress={handleStartGeoTriggering} /> }
// When device enters a Zone BluedotPointSdk.on("checkedIntoFence", (event) => console.log(event)); // When device exits a Zone BluedotPointSdk.on("checkedOutFromFence", (event) => console.log(event));
To:
// When device enters a Zone BluedotPointSdk.on("enterZone", (event) => console.log(event)); // When device exits a Zone BluedotPointSdk.on("exitZone", (event) => console.log(event));
// Start Tempo BluedotPointSdk.startTempoTracking("destinationId", () => console.log("Callback")); // Stop Tempo BluedotPointSdk.stopTempoTracking();
To:
import { Button, View } from 'react-native' import BluedotPointSdk from 'bluedot-react-native' export default function App() { // The SDK needs be initialized and the app must have location permissions. const tempoService = new BluedotPointSdk.TempoBuilder() function handleStartTempo() { tempoService // * The Android Foreground notfication is required by Tempo * .androidNotification( "Android notification channel Id", "Android notification channel name", "Android notification title", "Android notification content" ) .start( "Destination ID", () => console.log("On Success Callback"), () => console.error("On Error Callback"), ) } function handleStopTempo() { BluedotPointSdk.stopTempoTracking( () => console.log("On Success Callback"), () => console.log("On Error Callback") ) } return ( <View> <Button title="Start Tempo" onPress={handleStartTempo} /> <Button title="Stop Tempo" onPress={handleStopTempo} /> </View> ) }
BluedotPointSdk.on("tempoTrackingDidExpire", (event) => console.log(event)); BluedotPointSdk.on("tempoTrackingStoppedWithError", (event) => console.log(event));
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" const shouldTargetAllApis = true BluedotPointSdk.setForegroundNotification( channelId, channelName, title, content, shouldTargetAllApis )
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" const notificationId = "Bluedot Forground Service" const geoTriggeringService = new BluedotPointSdk.GeoTriggeringBuilder(); function handleStartGeoTriggering() { geoTriggeringService .androidNotification( channelId, channelName, title, content, notificationId // Optional ) .start( () => console.log("On Success Callback"), () => console.error("On Error Callback"), ) } const tempoService = new BluedotPointSdk.TempoBuilder() function handleStartTempo() { tempoService // * The Android Foreground notfication is required by Tempo * .androidNotification( channelId, channelName, title, content, notificationId // Optional ) .start( "Destination ID", () => console.log("On Success Callback"), () => console.error("On Error Callback"), ) }