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

Mobility Insights

To learn about the Mobility Insights feature, check out this page.

Prerequisites

The Mobility Insights 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 event timeline dependency.

app/build.gradle
dependencies {
    implementation(platform('com.sentiance:sdk-bom:<sentiance-version>'))
    implementation('com.sentiance:sdk-event-timeline')
}
React Native

This feature is included after installing the following modules:

Flutter

This feature can be added by installing the following packages:

Utilize the Event Timeline APIs

In this section, you can find examples of how to query the Sentiance SDK for historic timeline events (e.g. transports and stationaries), and how to register to receive timeline updates in your app, as new events are detected or existing ones are updated.

Query for Historic Events

You can query for past events in the user's timeline by utilizing the getTimelineEvents method.

The Sentiance SDK has the capacity to remember 9 weeks of events. It is recommended to store a copy of these events on your end, that way, you can store a much longer history. To properly collect events and store them in your own event store, check out the next section.

Subscribe for and Retrieve Event Timeline Updates

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

To receive event updates, such as when a transport starts or ends, you can subscribe for event timeline updates.

The example below demonstrates a robust approach to collecting timeline events by combining an event update subscription with a query for updates since the last processed event. This ensures the logic remains resilient to interruptions or unexpected app terminations.

Last updated