LogoLogo
SentianceInsights-Control-TowerLegacy DocsImportant Security Notice
  • Introduction
  • Integrating the SDK
    • Getting Started
    • Android Quick Start
      • 1. Including the SDK
      • 2. Initialization
      • 3. User Creation
      • 4. Enabling Detections
      • 5. SDK Status Updates
      • 6. Permissions
      • 7. Additional Requirements
    • iOS Quick Start
      • 1. Including the SDK
        • Using CocoaPods
        • Using Carthage
        • Using Swift Package Manager
        • Manual Integration
      • 2. Project Settings
      • 3. Initialization
      • 4. User Creation
      • 5. Enabling Detections
      • 6. SDK Status Updates
      • 7. Permissions
      • 8. Additional Requirements
    • React Native Quick Start
      • 1. Including the SDK
      • 2. Configuration
      • 3. Initialization
      • 4. User Creation
      • 5. Enabling Detections
      • 6. SDK Status Updates
    • Flutter Quick Start
      • 1. Including the SDK
      • 2. Configuration
      • 3. Initialization
      • 4. User Creation
      • 5. Enabling Detections
      • 6. SDK Status Updates
    • What Comes After Integration
    • Integration (FAQ)
    • Detections (FAQ)
  • Sentiance Insights
    • Overview of Sentiance Insights
      • Driving Insights
        • Transports
        • Driving Events and Scores
        • Car Crashes
      • Mobility and Lifestyle Insights
        • Visit Essentials
        • User Segmentation
    • Engagement
      • User Adaptive Score
      • Streaks
      • Challenges
      • Reward System
      • Communication Campaign
      • Social Groups
        • Technical Details
    • Accessing Sentiance Insights
      • via On Device API
      • via Cloud API
      • via Firehose - Realtime Messages
      • via Offloads
  • FAQ
    • Security, Privacy and Terms of Service (FAQ)
  • Important topics
    • SDK
      • Appendix
        • Android
          • Android 10 Update Behavior
          • Android Battery Optimization
          • Artifacts & Dependencies
          • Manifest Permissions
          • Notification Management
          • Sample Notification
          • Supported API Levels
        • iOS
          • App Store Privacy Section
          • App Store Release
          • Apple Privacy Manifest
          • ARM Simulator Support
          • Dependencies
          • iOS 13 permission changes
          • Supported iOS Versions & Architectures
          • Swift Support
          • v5.x Framework Files
          • v6.x Framework Files
        • Controlled Detections
          • Automatic Detections
          • Automatic Detections with Forced Trips
          • Controlled Trips Only
          • Checking Trip Status
        • Control Sending Data
        • Custom User Metadata
        • Detecting Vehicle Crashes
        • Feature Production Readiness
        • Migration Guide
          • Android
          • iOS
          • React Native
          • Flutter
        • On-Device Features
        • React Native
        • SDK Initialization
        • User Access Token
        • User Creation
        • User Linking
        • Xamarin
      • API Reference
        • Android
          • AsyncInitializationError
          • AsyncInitializationResult
          • DateTime
          • DetectionStatus
          • DisableDetectionsError
          • DisableDetectionsResult
          • Driving Insights
            • CallWhileMovingEvent
            • DrivingInsight
            • DrivingInsightsApi
            • DrivingInsightsReadyListener
            • HarshDrivingEvent
              • Type
            • PhoneUsageEvent
            • SafetyScores
            • SafetyScoreRequestParameters
              • Builder
              • OccupantRoles
              • Period
              • TransportModes
            • SpeedingEvent
          • Smart Geofences
            • DetectionMode
            • SmartGeofence
            • SmartGeofenceApi
            • SmartGeofenceEvent
              • Type
            • SmartGeofenceEventListener
            • SmartGeofencesRefreshError
              • SmartGeofencesRefreshFailureReason
            • SmartGeofencesRefreshResult
          • EnableDetectionsError
            • EnableDetectionsFailureReason
          • EnableDetectionsResult
          • EventTimeline
            • EventType
            • TransportMode
            • Event
              • OffTheGridEvent
              • StationaryEvent
              • TransportEvent
              • UnknownEvent
            • EventTimelineUpdateListener
            • EventTimelineApi
            • OccupantRole
            • Venue
              • VenueType
              • VenueSignificance
          • Feedback
            • FeedbackApi
            • OccupantRoleFeedback
            • OccupantRoleFeedbackResult
          • GeoLocation
          • InitializationResult
            • InitializationFailureReason
          • InitState
          • MetaUserLinker
          • MetaUserLinkerAsync
          • MetaUserLinkerCallback
          • OnInitCallback
            • InitIssue
          • OnSdkStatusUpdateHandler
          • OnStartFinishedHandler
          • PendingOperation
            • OnSuccessListener
            • OnFailureListener
            • OnFailureListener
            • OnCompleteListener
          • ResetCallback
            • ResetCallback.ResetFailureReason
          • ResetError
            • ResetFailureReason
          • ResetResult
          • SdkConfig
            • LocationPermission
            • Builder
          • SdkException
          • SdkStatus
            • LocationSetting
            • Quota Status
            • StartStatus
          • SdkStatusUpdateListener
          • Sentiance
          • SentianceOptions
            • SentianceOptions.Builder
          • StartTripError
            • StartTripFailureReason
          • StartTripResult
          • StationaryInfo
          • StopTripError
            • StopTripFailureReason
          • StopTripResult
          • SubmitDetectionsCallback
          • SubmitDetectionsError
            • SubmitDetectionsFailureReason
          • SubmitDetectionsResult
          • Token
          • TokenResultCallback
          • TransmittableDataType
          • Transport Sessions
            • SensorDataChunk
            • TransportSession
            • TransportSessionApi
            • TransportSessionListener
          • Trip
            • StartTripCallback
            • StopTripCallback
            • TransportMode
            • TripTimeoutListener
            • TripType
          • TripInfo
          • UserAccessTokenError
            • UserAccessTokenFailureReason
          • UserActivity
          • UserActivityListener
          • UserActivityType
          • UserContext
            • Attribute
            • Segment
              • SegmentCategory
              • SegmentSubcategory
              • SegmentType
            • SemanticTime
          • UserContextApi
            • RequestUserContextFailureReason
            • RequestUserContextError
            • UserContextUpdateCriteria
            • UserContextUpdateListener
          • UserCreationError
            • UserCreationFailureReason
          • UserCreationOptions
            • UserCreationOptions.Builder
          • UserCreationResult
            • UserInfo
          • UserLinker
          • UserLinkerAsync
          • UserLinkerCallback
          • UserLinkingError
            • UserLinkingFailureReason
          • UserLinkingResult
          • VehicleCrashDetection
            • CrashDetectionApi
            • CrashDetectionState
            • VehicleCrashDiagnostic
            • VehicleCrashEvent
            • VehicleCrashDiagnosticListener
            • VehicleCrashListener
            • VehicleCrashSeverity
          • Waypoint
        • iOS
          • Detections
            • Enable Detections
            • Disable Detections
          • Driving Insights
            • SENTCallWhileMovingEvent
            • SENTDrivingInsights
            • SENTDrivingInsightsReadyDelegate
            • SENTHarshDrivingEvent
              • HarshDrivingEventType
            • SENTPhoneUsageEvent
            • SENTSpeedingEvent
            • SENTSafetyScores
            • SafetyScoreRequestParameters
              • SafetyScoreRequestOccupantRoleOption
              • SafetyScoreRequestPeriod
              • SafetyScoreRequestTransportModeOption
          • Event Timeline
            • EventTimelineDelegate
            • SENTOccupantRole
            • SENTTimelineEvent
              • SENTOffTheGridEvent
              • SENTStationaryEvent
              • SENTTransportEvent
              • SENTUnknownEvent
            • SENTTimelineEventType
            • SENTTimelineTransportMode
            • SENTVenue
            • SENTVenueSignificance
            • SENTVenueType
          • Feedback
            • SENTFeedback
            • SENTOccupantRoleFeedback
            • SENTOccupantRoleFeedbackResult
          • SENTCompletionHandlers
          • SENTConfig
          • SENTDate
          • SENTGeolocation
          • SENTAsyncInitializationCompletionHandler
          • SENTAsyncInitializationError
          • SENTAsyncInitializationResult
          • Sentiance
          • SENTInitializationResult
          • SENTOptions
            • SENTOptionsInitPurpose
          • SENTPublicDefinitions
          • SENTSDKStatus
          • SENTToken
          • SENTTransmittableDataType
          • SENTUserActivity
          • SENTVehicleCrashDetectionState
          • SENTVehicleCrashDiagnostic
          • SENTVehicleCrashEvent
            • SENTVehicleCrashSeverity
          • SENTWaypoint
          • Smart Geofences
            • SENTSmartGeofencesRefreshHandler
            • SmartGeofenceDetectionMode
            • SmartGeofencesRefreshError
              • SmartGeofencesRefreshFailureReason
            • SmartGeofencesRefreshResult
            • SmartGeofence
            • SmartGeofenceEvent
              • SmartGeofenceEventType
            • SmartGeofenceEventDelegate
          • Transport Sessions
            • SENTAccelerometerDataIterator
            • SENTLocationDataIterator
            • SENTSensorDataChunk
            • SENTTransportSession
          • User Context
            • SENTAttribute
            • SENTRequestUserContextCompletionHandler
            • SENTRequestUserContextError
            • SENTRequestUserContextFailureReason
            • SENTSegment
              • SENTSegmentCategory
              • SENTSegmentSubCategory
              • SENTSegmentType
            • SENTSemanticTime
            • SENTUserContext
            • SENTUserContextDelegate
            • SENTUserContextUpdateCriteria
          • User Creation & Linking
            • SENTUserInfo
            • User Creation
              • SENTUserCreationResult
              • SENTUserCreationFailureReason
              • SENTUserCreationError
              • SENTUserCreationCompletionHandler
              • SENTUserCreationOptions
            • User Linking
              • SENTNoOpUserLinker
              • SENTUserLinkingResult
              • SENTUserLinkingFailureReason
              • SENTUserLinkingError
              • SENTUserLinkingCompletionHandler
              • SENTUserLinker
        • React Native
          • core
            • Definitions
            • Examples
          • crash-detection
            • Definitions
            • Examples
          • driving-insights
            • Definitions
            • Examples
          • smart-geofences
            • Definitions
            • Examples
          • event-timeline
            • Definitions
            • Examples
          • legacy
            • Definitions
            • Examples
          • user-context
            • Definitions
            • Examples
        • Flutter
      • Battery Optimization on Android
      • How To
        • Check the Location Permissions
        • Utilize the Event Timeline API
        • Utilize the Driving Insights API
        • Utilize the User Context API
        • Utilize the Smart Geofences API
      • Troubleshooting
        • Android
        • iOS
      • Changelog
        • Android
        • iOS
        • React Native
        • Flutter
    • Authentication and Authorization
    • User Creation (via Authentication Code)
    • User Deletion
    • PlayStore Location Access Review
    • Privacy Report & Dashboard
    • Crash Detection
    • Important Security Notice
    • Injecting Fake Data
    • Custom Aggregation For Analytics
    • Merging Scores for Motorcycles and Cars
  • Links
    • SDK Standard License
    • Insights-by-Sentiance Application
    • Insights-by-Sentiance Privacy Policy
    • Journeys License
    • Technical & Organizational Measures
Powered by GitBook
On this page
  • Migrating from 4.x to 6.x
  • General Changes
  • Code Changes & Deprecations
  • Minimal Migration Steps
  • Full Migration Steps
  • Migrating from 3.x to 4.x
  • SDK Initialization
  • SDK Control
  • User Metadata
  • External Events
  • Trip Control
  • Callbacks
  • Other
  1. Important topics
  2. SDK
  3. Appendix
  4. Migration Guide

Android

PreviousMigration GuideNextiOS

Last updated 10 months ago

Migrating from 4.x to 6.x

Version 6.x brings a lot of improvements and new features to the Sentiance SDK, like a simpler API for initialization, user creation, authentication and linking users. Some of these improvements result in breaking changes in the existing integration. This section describes all the changes that were made since version 4.22.1, and provides two code migration paths: a minimal one that utilizes existing (but deprecated) APIs, and a full one that utilizes only the new APIs.

Please note that new SDK features and functionality will be supported via the new API methods and classes. As such, you are encouraged to do a full migration, in order to benefit from upcoming features and improvements.

General Changes

Minimum Supported Android Version

We have bumped the minimum supported Android version to 6.0 (Marshmallow—API level 23). If you target an older version of Android, please see troubleshooting guide to learn how to resolve related issues.

Java 8 Compatibility

Version 6.x makes use of Java 8 language features. Make sure your app is configured to support Java 8. See guide.

Proguard Rules

Version 4.x automatically applied the following rule when compiling your app:

-keepattributes SourceFile, LineNumberTable

Though beneficial for using stack traces, there was no way for developers to omit this rule if desired to do so. In version 6.x, we have omitted this rule from our libraries.

Important

If you want to retain debugging information for your app (e.g. to troubleshoot crashes), make sure that this rule exists in your app's own proguard rules file.

Google Play Services Location Library

We have updated the minimum required version of the Google Play Services location library (com.google.android.gms:play-services-location) to 18.0.0. If your app targets a different version, please note that Gradle will automatically pick the highest one. You can verify which version is being picked by running:

$ ./gradlew app:dependencies

...
releaseRuntimeClasspath - Runtime classpath of compilation 'release' (target  (androidJvm)).
+--- com.sentiance:sdk:6.0.0
|    +--- com.google.android.gms:play-services-location:18.0.0

You should see something similar to line 6 above. However, if you have explicitly excluded the location library from the Sentiance SDK's transitive dependencies (see the below example), please either omit this exclusion, or update the location library version defined in your app's dependencies.

build.gradle
// If you have an exclusion rule similar to line 7, either omit it or 
// update your own GMS location library version (line 10).

dependencies {
	implementation ('com.sentiance:sdk:4.19.2@aar') {
		transitive = true
		exclude group: 'com.google.android.gms'
	}
	
	implementation "com.google.android.gms:play-services-location:18.0.0"
}

After making the above change, run ./gradlew app:dependencies to verify the chosen library version.

Android Support Libraries

As version 4.x targeted an older version of the Google Play Service location library, it brought along with it some old android-support transitive dependencies. With the version 18.0.0, these support libraries have now been replaced with their AndroidX counterparts.

SDK Artifacts & Dependencies

If you reference our SDK as a local aar file inside your project, or by hosting it in a private repository, please make sure all of the new dependencies are met, including transitive ones.

The core Sentiance functionality is provided by the com.sentiance:sdk artifact. This includes operations like creating a Sentiance user, and starting detections. Other library artifacts act as extensions that include additional Sentiance features and functionality. For example, com.sentiance:sdk-crash-detection includes the crash detection feature.

To enable these additional features, you need to add the corresponding artifact as a dependency in your app. You can make use of the SDK's bill of materials (BOM) artifact to reference a single version and avoid incompatibility issues:

build.gradle
dependencies {
    ...
    implementation(platform('com.sentiance:sdk-bom:6.0.0'))
    implementation('com.sentiance:sdk')
    implementation('com.sentiance:sdk-crash-detection')
}

Some features must be activated by Sentiance before you can start using them. Please reach out to our support team to make sure that the feature you want to use is activated.

Android XML Backup Rules

Code Changes & Deprecations

We have updated the SDK API methods and classes to make it easier to integrate our SDK into your app. By doing so, we have deprecated some existing API methods and classes. These APIs will still function properly, however we plan to remove them in the next major release.

User Linking

The following classes and interfaces under the com.sentiance.sdk package have been renamed:

Old Name
New Name

MetaUserLinker

UserLinker

MetaUserLinkerAsync

UserLinkerAsync

MetaUserLinkerCallback

UserLinkerCallback

The setMetaUserLinker method of the SdkConfig.Builder class has been renamed to setUserLinker.

SdkStatus

The startStatus field has been deprecated. The new detectionStatus field has been added as its successor.

Crash Detection

Crash detection is now made available via a separate library artifact. You therefore need to add com.sentiance:sdk-crash-detection as a dependency to your app, in order to activate the feature.

The new entry point for crash detection related functionality is the CrashDetectionApi class. The following methods have therefore been removed from the Sentiance class and are now available in the CrashDetectionApi class:

  • invokeDummyVehicleCrash (no signature change)

  • setVehicleCrashListener (no signature change)

  • isVehicleCrashDetectionSupported (signature update: the TripType parameter has been removed)

Additionally, the following classes and interfaces have been moved to the com.sentiance.sdk.crashdetection.api package:

  • VehicleCrashEvent (the existing properties of this class are no longer nullable).

  • VehicleCrashListener

Lastly, the following (previously deprecated) API classes and methods have been removed:

  • com.sentiance.sdk.crashdetection.CrashCallback

  • Sentiance.setCrashCallback(CrashCallback callback)

Asynchronous Methods

PendingOperation allows you to set success, failure, and completion handlers to asynchronously handle an operation's result.

// Enable SDK detections and 
val pendingOperation = sentiance.enableDetections()
    .addOnSuccessListener { result ->
        //...
    }
    .addOnFailureListener { error -> 
        //...
    }
    .addOnCompleteListener { operation ->
        if (operation.isSuccessful) {
            //...
        } else {
            //...
        }
    }

Moreover, it offers the possibility to wait for the result up to a certain duration, or until completion.

// Wait 30 seconds
val pendingOperation = sentiance.enableDetections().waitFor(30, TimeUnit.SECONDS)

// Wait till completion
val pendingOperation = sentiance.enableDetections().waitTillCompletion()

SDK Initialization & User Creation

The existing SDK initializer served two purposes:

  1. Create a Sentiance user if one does not exist;

  2. initialize internal SDK components and resume detections.

We have deprecated the existing initializer init in favor of a new method called initialize. This new method does not create a Sentiance user. Instead, if a Sentiance user already exists, it initializes the SDK internally and resumes detections (if detections were enabled in the past).

To create a Sentiance user, we have added a new method called createUser. You can use this method to create a Sentiance user anywhere in your app. Note that you can only create one user at any time. To create a different user, you must first reset the SDK.

Given that user creation is not part of initialization anymore, we expect apps to initialize the SDK during app startup, without postponing or delaying it. The new initializer can safely be called when a Sentiance user does not exist yet, as it will only do minimal work to prepare the SDK for user creation.

As long as a Sentiance user exists on the device, you are expected to initialize the SDK during app startup, without delay or postponement. If you intend to not run detections for a brief period, simply call disableDetections instead. If you intend to not run detections for a longer duration, simply reset the SDK to remove the user from the device.

The deprecated method isInitialized() from Sentiance has also been removed. Use getInitState() instead.

Checking User Existence & Linking Status

You can use the new userExists() method to find out whether a Sentiance user already exists. And to check whether the user has been successfully linked (i.e. user linking), you can call isUserLinked().

Unlike the other SDK methods, these two methods can be called without needing to initialize the SDK first.

Minimal Migration Steps

1. Add Java 8 Support

2. Update the SDK Dependency

If your app makes use of the vehicle crash detection feature, add the com.sentiance:sdk-crash-detection dependency.

3. Update the Android XML Backup Rules

4. Apply Code Changes

  • Replace the SDK status isLocationPermGranted field usage with locationPermission.

  • Replace isInitialized() usage with getInitState().

Full Migration Steps

1. Add Java 8 Support

2. Update the SDK Dependency

If your app makes use of the vehicle crash detection feature, add the com.sentiance:sdk-crash-detection dependency.

3. Update the Android XML Backup Rules

4. Update the SDK Initialization

In your existing integration, you initialize the Sentiance SDK by calling init from within your Application's onCreate method. Replace init with the new initialize method. This method accepts a SentianceOptions object which you can create using its Builder. You can set a custom Android notification that the SDK can use via this Builder.

The following options are no longer available as initialization options:

  • Base URL (i.e. Sentiance platform URL): you will only need to specify this once, when creating a Sentiance user.

  • User linker: you will need to pass a linker when creating a user instead.

  • Sentiance credentials (i.e. app ID & secret): you will only need to specify these once, when creating a Sentiance user.

  • SDK status update handler: use the setSdkStatusUpdateListener method from Sentiance.

The Sentiance SDK must be initialized before creating a user. Therefore, remove any conditional checks that require the presence of a user before initializing the SDK. Calling initialize during app startup when there is no Sentiance user yet will not create a user. It will only do the necessary setup to make it possible to create a user later on.

Initialization is now always synchronous, and therefore you will receive the result as an InitializationResult object after calling initialize.

Detecting Incorrect Initializations

To assist you with the integration, we have added a notification mechanism for detecting most common incorrect initializations. When detected, the SDK will show a notification with a warning message, and a link to our documentation (when tapped). This notification is limited to debug builds of your app, and can be disabled via SentianceOptions.

5. Update the User Creation

In your existing integration, you will likely have some conditional logic that calls init to create a Sentiance user. Replace this call with createUser. This method accepts UserCreationOptions, allowing you to specify the Sentiance app credentials (app ID and secret), the Sentiance platform URL (optional), and a user linker. If your existing integration does not make use of user linking, pass UserLinker.NO_OP as the linker.

User Creation Without the Need for App Credentials

createUser returns the newly introduced PendingOperation, which you can use to capture the user creation result.

6. Update Enabling/Disabling Detections

We have deprecated the existing start() and stop() methods, and replaced them with enableDetections() and disableDetections() respectively. We believe these new methods give more clarity on what start and stop did in the past, as calling start did not always start detections, for example, due to a detection issue (e.g. in case of insufficient permissions).

These new methods are persistent across app restarts and device reboots. Therefore, you only need to call them once, and the SDK will automatically resume (or halt) detections upon initialization.

Additionally, we've added a new method called getDetectionStatus() which we believe offers better clarity on the status of the detections. The possible results are: DISABLED, EXPIRED, ENABLED_BUT_BLOCKED, and ENABLED_AND_DETECTING. For cases when the detections are blocked, the SdkStatus is still available to get more information about what is blocking detections (e.g. insufficient permissions).

7. Update Other Asynchronous Method Usages

Replace the usage of the following asynchronous SDK methods with their new PendingOperation returning counterparts:

Deprecated Method
Replacement Method

reset(ResetCallback)

reset()

getUserAccessToken(TokenResultCallback)

requestUserAccessToken()

startTrip(Map, TransportMode, StartTripCallback)

startTrip(Map, TransportMode)

stopTrip(StopTripCallback)

stopTrip()

submitDetections(SubmitDetectionsCallback)

submitDetections()

The new methods return a PendingOperation result which you can use to capture the operation's result.

8. Update the Vehicle Crash Detection Code

9. Update Other Code Usages

  • Replace the SDK status isLocationPermGranted field usage with locationPermission.

  • Replace isInitialized() usage with getInitState().

Migrating from 3.x to 4.x

This update brings Android Oreo compatibility. You will now be able to target API level 26.

SDK Initialization

SDK Control

The stopAfter(seconds) method is no longer available.

User Metadata

User metadata methods no longer accept MetadataCallback as a 3rd parameter. Adding and removing metadata is now done asynchronously via the payload submission system.

External Events

Registering external events is no longer available.

Trip Control

Starting and Stopping Trips

Trip Details

Checking Ongoing Trips

Callbacks

All callback and listener methods are now executed on the application's main thread. If you perform any long running or network operations directly in the callbacks, please take care to move them to a background thread instead.

Other

getWiFiLastSeenTimestamp() is no longer available.

The CrashCallback's Location parameter is now @Nullable.

Version 6.x breaks down SDK features and functionality into multiple artifacts, each with its own dependencies. Check to see all the artifacts and dependencies.

The that are applied by the Sentiance SDK have been updated. If you have overwritten the backup rules in your app's manifest, please update it by including any missing SDK rule. See troubleshooting guide.

The boolean status field isLocationPermGranted has been removed, and replaced with a new enum field .

Existing asynchronous SDK methods have been deprecated. New asynchronous methods have been added, that return a , which is similar to the .

To learn more about what PendingOperation offers, see the API reference page .

The following steps describe the minimal changes that you have to do, in order to compile and run your app with v6.x of the Sentiance SDK. Depending on your development environment and integration method, you might need to make additional changes that are not mentioned here. If you haven't already done so, please go through the section in order to get a complete list of the changes that were made in version 6.x.

Make sure your app supports Java 8. See guide.

In your app, update the Sentiance SDK dependency to use the BOM artifact, and reference v6.x of the SDK. See .

If you have specified custom backup rules in your app's manifest file, add the missing SDK rules. See .

For user linking, update the class and interface names. See .

For vehicle crash detection, update the package name of the imported classes and utilize the CrashDetectionApi class to access the crash detection methods with their updated signatures. See . If you were using the deprecated crash detection methods from the Sentiance class, migrate to the new ones.

The following steps describe all the changes that you have to do, in order to replace deprecated Sentiance API usage with non-deprecated counterparts, and successfully compile and run your app after updating to v6.x. Depending on your development environment and integration method, you might need to make additional changes that are not mentioned here. If you haven't already done so, please go through the section in order to get a complete list of the changes that were made in version 6.x.

Make sure your app supports Java 8. See guide.

In your app, update the Sentiance SDK dependency to use the BOM artifact, and reference v6.x of the SDK. See .

If you have specified custom backup rules in your app's manifest file, add the missing SDK rules. See .

: it's not possible to set this flavor programmatically anymore. This must be configured for your app on the Sentiance platform. Please reach out to our support team to make sure it is configured properly.

We expect apps to initialize the Sentiance SDK during app startup, without any postponement. Therefore, the new initializer must be called synchronously on the main thread, before Application.onCreate() completes ().

In addition to the user-linker based approach of creating users, we have introduced an improved linked-user creation mechanism, which replaces the Sentiance app credentials with a temporary authentication code, obtained from Sentiance at the moment of user creation. This is our recommended approach for creating users in all new integrations. You can read more about it .

Update the package name of the imported classes and utilize the CrashDetectionApi class to access the crash detection methods with their updated signatures. See . If you were using the deprecated crash detection methods from the Sentiance class, migrate to the new ones.

Initializing the SDK is done by calling the method and passing an object. now expects a notification as the 3rd parameter. enableForeground(notification) is no longer available for this purpose. The SDK will show a notification depending on the OS version, targeted API level, and remote app configuration.

and methods now require and parameters respectively.

The SDK no longer returns a Trip object when a trip is stopped. The method of no longer returns a Trip object. Similarly, the onTripStopped() method of no longer exists. This interface now provides an and methods.

The method now expects a parameter of type .

this page
PendingOperation<Result, Error>
Java Future
here
this
this
Triggered trips flavor
more about this requirement
here
General Changes
SDK Artifacts and Dependencies
here
here
General Changes
SDK Artifacts and Dependencies
here
this
troubleshooting crashes
XML Android backup rules
SdkConfig
SdkConfig.Builder
StartTripCallback
StopTripCallback
TripTimeoutListener
StopTripCallback
TripType
locationPermission
this
this
here
here
onTripTimeout()
init()
startTrip()
stopTrip()
isTripOngoing()
onSuccess()
onFailure(sdkStatus)