For the complete documentation index, see llms.txt. This page is also available as Markdown.

Smart Geofences


To learn about the Smart Geofences feature, check out this page. Smart Geofences can be configured for an entire population, but not at the individual user level. At the moment, creating geofences directly through the SDK is not supported. Instead, you can provide Sentiance with the list of geofences to configure.

Prerequisites

The Smart Geofences feature relies on additional library dependencies alongside the core SDK dependency. To start using this feature, you must first add these dependencies to you project.

iOS

This feature is included in the main SDK framework. No additional dependencies are needed.

Android

Open your app build.gradle file and add the smart geofences dependency.

app/build.gradle
dependencies {
    implementation(platform("com.sentiance:sdk-bom:<sentiance-version>"))
    implementation("com.sentiance:sdk-smart-geofences")
}
React Native

This feature is included after installing the following modules:

Flutter

This feature can be added by installing the following packages:

Utilize the Smart Geofences APIs

In this section, you’ll find examples showing how to subscribe for geofence entry and exit events, how to force-update the geofence list, and how to check the geofence monitoring status.

Listen to Smart Geofence Entry and Exit Events

Checkout Real-time Listeners to read more about implementing the SDK's Listeners

You can subscribe to receive geofence entry and exit event notification as they are detected.

Refresh the List of Monitored Geofences

The SDK regularly refreshes the list of monitored geofences. You can request an immediate refresh as follows:

Get the Current Smart Geofences Detection Mode

You can check the smart geofences detection mode as follows:

When enabled, the detection mode can either be in the foreground (i.e when the app is visible), or both foreground and background, depending on the type of location permission that has been granted (i.e. "always" or "while-in-use").

When detection mode is disabled, it indicates a general issue with the SDK’s detection. You can check the SDK status to identify the cause.

Last updated