Android

This document refers to deprecated parts of the platform and has been left intact to help customers with legacy integrations. In order to access the latest platform features and documentation, please go to https://docs.sentiance.com.

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

Initializing the SDK is done by calling the init() method and passing an SdkConfig object.SdkConfig.Builder 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.

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

``startTrip() and stopTrip() methods now require StartTripCallback and StopTripCallback parameters respectively.

Trip Details

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

Checking Ongoing Trips

The isTripOngoing() method now expects a parameter of type TripType.

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.

Last updated