Skip to main content

Migration Guide to 3.0.0

The Bluedot React Native wrapper version 3.0.0 is a major update of our APIs. It includes many updates in callbacks such as:

  • A new payload returned as part of Zone Entry and Exit Callbacks
  • New Tempo Callback that provides the user's ETA updates at runtime
  • Rule Download callback modified to not return the list of ZoneInfo’s, instead it can be accessed from an existing API to fetch ZoneInfo list.
  • Destination added as a part of ZoneInfo
  • New API to fetch Custom Event Meta Data set for a Bluedot Session.
  • Android - Permissions to use Foreground Service or to run Bluedot service in Background to be declared from App.

New Payload for enterZone and exitZone Callbacks:

The payload returned for enterZone and exitZone callbacks has been updated for the Geo-Trigger events, providing additional comprehensive information about the geofence interactions.

Android: Android Payloads

iOS: iOS Payloads

Updated Geo-Triggering Events

The updated geo-triggering events now provide detailed information about zone entry, exit, and updates, including properties such as notification type, app info, and zone details. For more information please refer to Geo-triggering events list

NameDescriptionEvent payload
enterZoneDevice enters a ZoneObject with the following properties:
  • notificationType: Entry
  • appInfo: App details
  • triggerEvents: Entry Event details with location Info and crossedFences
  • zoneInfo: Zone information with Id, name and customData
  • installRef: Unique ID assigned to the device per Geo-trigger Session
  • projectId: ProjectId of the Project used from Canvas
  • deviceInfo: Device information
  • triggerChainId: unique ID assigned to a particular Entry event
exitZoneDevice exits a ZoneObject with the following properties:
  • notificationType: Exit
  • appInfo: App details
  • triggerEvents: Exit Event details with location Info and corresponding entry event
  • zoneInfo: Zone information with Id, name and customData
  • installRef: Unique ID assigned to the device per Geo-trigger Session
  • projectId: ProjectId of the Project used from Canvas
  • deviceInfo: Device Details
  • triggerChainId: ID same as the corresponding Entry event
zoneInfoUpdateThe SDK downloads the ZonesList of Zones downloaded can be fetched from BluedotPointSdk.getZonesAndFences()

New Tempo Event

A new Tempo Callback provides real-time ETA updates during the user's journey, offering details about estimated arrival times and destination information. For more information please refer to Tempo events list

NameDescriptionEvent payload
tempoTrackingDidUpdateReal time ETA updates for every Tempo event send to backendObject with the following properties:
  • eta: Estimated time of arrival to a particular store
  • etaDirection: lessThan/greaterThan from the eta value
  • destination: Destination details of the store like address, location and destinationId
  • triggerChainId: unique Id per Tempo session

New API to getCustomEventMetaData

A new API allows you to fetch custom event metadata set for a Bluedot session. For more details on Custom Event Metadata, please refer to the documentation here.

BluedotPointSdk.getCustomEventMetaData().then((metadata) => {  
const message = `CustomEventMetaData: ${JSON.stringify(metadata)}`;
});

Example to fetch list of Zone Info’s:

To retrieve the updated list of Zone Information, you can use the following example. Note that the zoneInfoUpdate callback no longer directly returns zoneInfos. Instead, you should query the list of zones directly from the SDK using the getZonesAndFences method.

BluedotPointSdk.on("zoneInfoUpdate", () => { 
// zoneInfoUpdate callback no longer returns zoneInfos,
// query it directly from the SDK
BluedotPointSdk.getZonesAndFences().then((zoneInfos) => {
if (zoneInfos != null) {
const message = `Did Update ZoneInfo ${JSON.stringify(zoneInfos)}`;
console.log(JSON.stringify(zoneInfos))
}
});
});

Android Location Permissions Change

For Android Devices Bluedot Service no longer declares Foreground and Background usage permissions in it’s Manifest, so we suggest to add the Foreground or Background usage permissions in App’s Manifest. To ensure proper functionality, you need to update the app's location permissions in the manifest. Please follow the detailed instructions in the documentation: Update the app's location permissions in the manifest