- On certain devices, the venue type of stationary events returned by the user context API is always set to unknown.
{% hint style="info" %} Production Readiness Update
In this release, the following features have been promoted from Early Access to Production Ready:
- Transport classification
- Home & work detection
- User segment detection
- User's current context information
See our On-Device Features page for more information about these features. Detailed overview of feature production readiness can be found on this page. {% endhint %}
{% hint style="warning" %} This version includes breaking changes for some Early Access features. {% endhint %}
- HarshDrivingEvent now provides separate start and end dates, instead of a single event date.
- Phone usage detection during vehicular transports. This feature is part of the on-device Driving Insights feature. It uses a custom machine learning model to accurately detect phone usages. The detected events can be obtained using the getPhoneUsageEvents.
- Focused driving safety score, which is calculated by taking into account the detected phone usage events during vehicular transports. See SafetyScore.
- Improvements to the on-device home and work location detection.
- Incorrect user semantic time when querying the user's context.
- Potentially lingering SDK foreground service, when a user gets deactivated.
- Stability fixes to the home/work detection and venue-type mapping features.
- Excessive battery usage while detections are disabled, caused by an unterminated Android job.
- Runtime exception caused by stack overflow during stationary venue-type mapping.
- Stability improvements to home and work venue detection.
- Runtime exception when using the TransportSession feature.
{% hint style="warning" %} This version includes breaking changes for some Early Access features. {% endhint %}
- A new Driving Insights feature, which provides information about a user's driving behaviour. In this first version, the SDK detects harsh driving events (e.g. acceleration, braking, and turning), which are then used to compute a vehicular transport's smooth driving score. This data is available via the new DrivingInsightsApi, which allows the subscription to, and retrieval of DrivingInsights and HarshDrivingEvents. This feature is accessible via the sdk-driving-insights artifact, and must be enabled by Sentiance before use.
- A new TransportSession API, which allows the subscription to, and retrieval of TransportSessions. A transport session corresponds to a transport that was detected by the SDK, and includes information such as the mode of transport, and the raw sensor data that was used to classify it. This API is primarily intended to be used for accessing the raw sensor data. To simply be notified of new transports, it's more efficient to utilize the UserContextApi.
- A short history of locations inside VehicleCrashEvent, which represent the preceding locations leading up to the crash event.
- Rare issue that causes the incorrect determination of the end of a stationary.
- BREAKING: a number of user segments that are no longer supported.
- Runtime exception when retrieving historic app exit reasons, as a result of buggy Android framework code on some Samsung devices.
{% hint style="info" %} This patched version should be used only if you intend to remain on version 6.1. Otherwise, it is recommended to use the latest 6.2 version instead. {% endhint %}
- A stability issue in v6.1.0 impacting http requests.
- Proguard rules for Google Play Service Location library classes, which are required since SDK v6.2.1.
- Runtime exception when targeting Google Play Services Location library v21.
{% hint style="warning" %} This version includes breaking changes for some Early Access features. {% endhint %}
- Transport waypoint and distance information to TransportEvent, which is part of the event list returned in UserContext. Both waypoints and distance are based on unprocessed (i.e. raw) location data.
- User's current semantic time info to UserContext (e.g. morning, lunch, evening). See SemanticTime.
- Support for uploading additional SDK status information to the Sentiance Cloud Platform.
- New SDK dependencies. See dependencies.
- Stationary venue mapping has been update to an improved version, but that is limited to venue-type mapping. i.e. a stationary will no longer reference a specific venue, but a venue type instead.
- Improved support for on-device user segment detection.
- The Android target and compile API versions have been updated to 33.
- Improved detection of delayed SDK initialization.
- IllegalArgumentException caused by inconsistency during sorting a collection.
- ForegroundServiceStartNotAllowedException when starting a service in the background.
- NullPointerException when uploading logs to the Sentiance Cloud Platform.
- BREAKING: UserContextUpdateCriteria.ACTIVE_MOMENTS.
- BREAKING: The Moment class. UserContext no longer returns moments.
- BREAKING: venueSignificance is removed from StationaryEvent, and moved to the Venue class. StationaryEvent now references a Venue.
- BREAKING: VenueCandidates and Visit classes are removed. venueCandidates has been removed from StationaryEvent.
- BREAKING: Venue now has a nullable location, which previously was not nullable. The location can be null when it's unknown, such as when a stationary has a venue significance of "point of interest". In this case, only the venue type is known, but not its exact location.
- BREAKING: Venue no longer has venue name or labels.
{% hint style="warning" %} This version includes breaking changes for some Early Access features. {% endhint %}
- Diagnostic API for monitoring vehicle crash detection. See setVehicleCrashDiagnosticListener.
- App-configurable rules to control SDK data transmission to the Sentiance Cloud Platform. The app can specify which of the following data types are allowed to be transmitted to the Sentiance platform: vehicle crash data, SDK and device info, general detection data, all data. See setTransmittableDataTypes.
- Support for car, bus, train, and tram/metro transport mode detection, part of the user's current context information.
- Internal support in the SDK to notify the Sentiance Cloud Platform that the SDK has been reset.
- Improved the detection of user device interaction during trips.
- Improved the error details that is returned to the app during failed user creation.
- Detection of vehicle crashes that occur towards the end of a trip.
- BREAKING: vehicle and rail transport modes from the user's current context information.
- Improved the vehicle crash detection algorithm.
- Improved the vehicle crash detection algorithm.
- Failure to reset the SDK, when the SDK hasn't been initialized yet.
- Invalid SDK state, when user creation is interrupted by app termination or unfinished user linking, requiring an SDK reset to be able to complete user creation.
{% hint style="info" %} Breaking Changes
Version 6.0 is a major release and includes multiple deprecations and breaking changes. Please read our migration guide to learn how to upgrade to this version.
Given the significance of the changes in this version, we recommend testing your app carefully, before making it available to your wider audience. {% endhint %}
- A Sentiance user creation method that supports the existing user-linking flow, and a new authentication-code based flow. The new flow is the recommended approach for future integrations.
- A dedicated SDK initializer that does not create a Sentiance user. To be used in combination with the user creation method.
- Improved versions of asynchronous SDK methods that return
PendingOperation
as a result (akin to a Java Future), instead of accepting success/failure callbacks, offering more flexibility and Kotlin friendliness. - Detection enabling and disabling methods that are persistent across app restarts, and that replace the SDK's start and stop methods.
CrashDetectionApi
for accessing and subscribing for vehicle crash detection info. This class is in the newly added com.sentiance.sdk-crash-detection artifact.- User Context information, which can be requested or subscribed for, and which includes a user's recent timeline events, the home and work locations (if detected), and a user's segments (if detected). This feature is released as Early Access and must be enabled by Sentiance first. For more information about it, see our On-Device Features page.
- On-device user event timeline generation, with support for real-time transport classification using Sentiance's ML-based transport classifier. This feature is released as Early Access and must be enabled by Sentiance first. The timeline is made available via the UserContextApi class.
- On-device venue mapping of stationary locations, using Sentiance's ML-based classifier. This feature uses venue data that is downloaded and stored offline. It is released as Early Access. The venue information is made available via the UserContextApi class. For more information about this feature, see our On-Device Features page.
- On-device segment detection. This feature is released as Early Access and must be enabled by Sentiance first. The segment data is made available via the UserContextApi class. For more information about this feature, see our On-Device Features page.
- Ability to capture mini-dumps of native process crashes.
- Ability to capture ANR data for troubleshooting on Android 11+.
- Limited support for running detections when the location permission is while-in-use, and when the app is in the foreground.
- Support for collecting various sensor data when the app is in the foreground.
- Nullability annotations for all public methods and classes.
SdkStatus.userExists
andSdkStatus.detectionStatus
userExists
andisUserLinked
methods in theSentiance
class, accessible without initializing the SDK.
- Bumped the minimum support Android version to 6.0.
- Required target Java language level is Java 8.
- Switched to the R8 obfuscator/shrinker.
- Switched to a modular artifact architecture. Some features are not extracted to their own modules. e.g. Crash detection is now in the com.sentiance:sdk-crash-detection artifact, which must be added separately to your app.
- Vehicle crash detection functionality has been moved to the artifact com.sentiance:sdk-crash-detection. Related methods and classes have been moved to a different package.
MetaUserLinker
is renamed toUserLinker
.MetaUserLinkerAsync
is renamed toUserLinkerAsync
.MetaUserLinkerCallback
is renamed toUserLinkerCallback
.SdkConfig.Builder.setMetaUserLinker()
is renamed toSdkConfig.Builder.setUserLinker()
- Moved the following methods and classes to new package:
invokeDummyVehicleCrash
,setVehicleCrashListener
,isVehicleCrashDetectionSupported
,VehicleCrashEvent
,VehicleCrashListener
init(SdkConfig, OnInitCallback)
reset(ResetCallback)
start(OnStartFinishedHandler),
start(Date, OnStartFinishedHandler)
andstop()
getUserAccessToken(TokenResultCallback)
startTrip(Map<String, String>,TransportMode, StartTripCallback)
andstopTrip(StopTripCallback)
submitDetections(SubmitDetectionsCallback)
SdkStatus.startStatus
andSdkStatus.locationPermission
- Occasional ANR events caused by the SDK during start.
- Proguard rule
-keepattributes SourceFile, LineNumberTable
setCrashCallback(CrashCallback)
andCrashCallback
isInitialized()
SdkConfig.isForegroundEnabled()
TripProfileConfig
,TripProfileListener
,setTripProfileListener(TripProfileListener)
, andupdateTripProfileConfig(TripProfileConfig)
SdkStatus.isLocationPermGranted
- Improved the vehicle crash detection algorithm.
{% hint style="info" %} This release updates the SDK's TensorFlow Lite dependency version to 2.7.0. If your app depends on a different version of TensorFlow Lite, make sure to test it for compatibility before updating. {% endhint %}
- Updated the TensorFlow Lite dependency to v2.7.0.
- Updated the vehicle crash detection ML model for TensorFlow Lite v2.7.0 compatibility.
- Improved the vehicle crash detection algorithm.
- A minor bug in the cash detector related to processing negative longitude and latitude coordinates.
- Step count tracking (disabled by default).
- Improved the vehicle crash detection algorithm.
- Added support for vehicle crash detection when activity recognition permission is not granted.
- Improved trip detection under certain inaccurate location conditions.
- Added more leniency towards short interruptions to the SDK detections that are caused by toggled airplane mode, or changing of available location providers (usually a result of OS power saving optimizations).
- Limited foregrounding SDK services when the debugger is attached, to prevent potential ANRs.
- Legacy on-device trip profiling. This feature will be removed in the next major release.
- Incompatible machine learning model usage when the SDK is downgraded.
- SecurityException on Android 5 when the READ_PHONE_STATE permission is missing.
- Avoid logging credentials in the SDK's private log files.
{% hint style="info" %} This version targets API level 31, adding Android 12 support. {% endhint %}
{% hint style="warning" %} If you app supports Android 5, you must add the READ_PHONE_STATE permission in your app's manifest in order to allow the Sentiance SDK to detect phone calls. You can limit this permission to API level 22 by specifying android:maxSdkVersion="22".
Note: the absence of READ_PHONE_STATE in your app's manifest will cause the application to crash on Android 5. This is a bug that will be fixed in the next SDK version. {% endhint %}
- Support for targeting Android 12 in the host app.
- HIGH_SAMPLING_RATE_SENSORS manifest permission for Android 12.
- SCHEDULE_EXACT_ALARM manifest permission for Android 12.
- ACCESS_COARSE_LOCATION manifest permission for Android 12.
- Improved crash detection with an update to the internal crash detection model.
- Exported all manifest components that define intent filters.
- Specified mutability for internal Pending Intents.
- Updated mobile call detection to work without requiring the READ_PHONE_STATE permission (on Android 6 and above).
- Modified foreground service usage to support the new Android 12 restriction.
- Handled the absence of the precise location permission. The SDK will stop detections if this permission (ACCESS_FINE_LOCATION) is not granted. A new status indicator called isPreciseLocationPermGranted has been added to the SdkStatus for this purpose.
- Reduced the number of Android notifications that appear during stationary.
- NullPointerException caused by JobScheduler.getAllPendingJobs() returning null in some instances.
- Memory leak cause by holding a strong reference to an SDK service instance.
- The READ_PHONE_STATE permission has been removed from SDK library manifest. This permission was previously capped at API level 22, using the maxSdkVersion attribute.
- Occasional SecurityException when accessing the ConnectivityManager on Android 11+ devices.
- Failure to detect some phone calls during trips.
- A rare occurrence of a NullPointerException during internal SDK message handling.
- Failure to initialize the SDK on some emulator images due to a divide by zero error.
- Failure to run crash detection immediately after resetting the SDK.
- Support for tracking app foreground and background state changes.
- Support for collecting accelerometer range and max supported frequency.
- Improve detection of tablet devices by taking the device's smallest screen width into account.
Changed
- Use existing authentication token when submitting a token refresh request.
- Add fail-fast mechanism during third party user linking if linking has not been completed.
- Improve handling of out of order sensor data
- Fix skipped events in some rare cases.
- Stability improvements to the user authentication and sensor data collection.
- An improved and a more accurate vehicle crash detection, backed by a machine learning model. You must switch to using the new Sentiance API method
setVehicleCrashListener(VehicleCrashListener)
to activate it. - A new method to help test your crash detection integration. See
invokeDummyCrash()
. - A new method to check if crash detection is supported on the device for a specific trip type. See
isCrashDetectionSupported(TripType)
.
- Points of interest data is no longer provided in the
StationaryInfo
object (returned bygetStationaryInfo()
) by default. If you use this data, please reach out to us before updating to this SDK version. - On Android 9 and above, when background execution is restricted for your app (by the user or an OS power saving feature), SDK detections will no longer run. An
SdkStatus
update will be delivered to your app, withstartStatus
set toPENDING
andisBackgroundProcessingRestricted
set totrue
so that you can take the appropriate action. - Library dependency changes:
- Removed compile-time dependency on
com.google.code.findbugs:jsr305
- Added runtime dependency on
org.tensorflow:tensorflow-lite:2.2.0
. This dependency adds native libraries to your app. To limit their architectures, see here.
- Removed compile-time dependency on
-
setCrashCallback(CrashCallback)
is now deprecated. UsesetVehicleCrashListener(VehicleCrashListener)
instead.
- Minor stability and timeline quality improvements.
- Fatal exception when aborting service start-up due to uninitialized SDK.
- Stability improvement in the SDK logging subsystem.
{% hint style="info" %}
Starting from 4.16.0, SDK detections will no longer be supported on Android 4.4 and lower. When initializing the SDK, onInitFailure
will return INITIALIZATION_ERROR
with an accompanying SdkException
containing the message "Unsupported OS version."
This change does not impact the SDK's minimum supported API level (i.e. minSdkVersion). {% endhint %}
- Support for on-device trip profiling and hard event detection. This feature is not enabled by default.
- Support for remotely enabling "controlled trips only" detection mode.
- Disabled Proguard method synchronization optimization (method/marking/synchronized) due to incorrect removal of
synchronized
method markings. This change is also carried over to any application code when using Proguard. If you're using R8, it will have no impact on your code.
- Detection support for Android 4.4. and lower is now disabled.
- The
WRITE_EXTERNAL_STORAGE
permission is no longer requested by the SDK. Previously, this permission was requested up to API level 18. If you rely on the presence of this permission in the final manifest, please add it manually to your app's manifest instead.
- Issues related to ANR and failed foregrounding of SDK services.
- Properly reflect on the users timeline any SDK termination during trips.
- Ensure long trips are split to no more than 4 hour durations.
- Rare issue causing sensor timestamp misalignment.
- Support resetting the SDK to a "never initialized" state, clearing all SDK user data and allowing the creation of a new Sentiance user. See
reset(ResetCallback)
. - Improve the detection of granting the background location access permission on Android 10+.
- Update and replace the use of deprecated Google Play Services APIs.
- Motion activity detection issue during trips.
- A rare token refresh issue that causes an unreleased wakelock.
- Other minor bugs.
{% hint style="info" %} Starting from 4.13.0, we are no longer releasing the -R variant of the Sentiance SDK. If you are currently using the -R version, please update to the regular version. This change will not have any impact on your integration or user data. {% endhint %}
- The
WRITE_EXTERNAL_STORAGE
manifest permission is now limited to API level 18 and lower.
- Stop the internal heartbeat task when the SDK is stopped.
- Fix an occasional NullPointerException that occurs during detections.
- The
ACCESS_BACKGROUND_LOCATION
permission is now removed from the SDK's manifest. If you are targeting API level 29+, please add this permission to your app's manifest instead. The inclusion of this permission affected apps targeting API level 28 or lower. For more information about this change, please see here.
{% hint style="info" %} This version targets API level 29, adding Android 10 support. {% endhint %}
- Android 10 permission support.
- The
ACCESS_BACKGROUND_LOCATION
permission has been added to the SDK's manifest. Background location access is mandatory to support proper detections. See Location Permission. - The
android.permission.ACTIVITY_RECOGNITION
permission is required on Android 10 and above to prevent degradation in the detection quality. See Activity Recognition Permission.
- The
- Ability to obtain a user's nearby points of interest during stationary. You can now obtain a list of POIs and their type directly from the SDK instead of querying the Sentiance API. See
getPointsOfInterest()
. - Report the app's notification setting (enabled/disabled) to the Sentiance Platform.
- Report the device's Google Play Services version to the Sentiance Platform.
- Keep a metadata journal to prevent sending duplicate user metadata requests.
- Target API level is now 29.
- Use Android's network capability API on Android 10.
- The return type of
StationaryInfo.getLocation()
is no longer nullable. A stationary activity is guaranteed to have a proper location.
- Rare crash caused by a null pointer exception during call detection.
- Rare crash caused by concurrent modification exception.
- Properly capture unhandled exceptions (reported to the Sentiance Platform).
- Incorrect user activity type reported during SDK startup.
- The Sentiance app secret is no longer stored by the SDK.
- Improved stationary detection.
- Faster detection of location permission grant.
- Decrease the number of notifications shown during stationary.
- Explicitly set the
uses-feature
"android.hardware.location.gps"required
attribute tofalse
.
- Add missing fields to
toString()
andequals()
methods of theSdkStatus
class. - Properly detect and end ongoing (internal) SDK trips with poor location accuracy.
- Support automatic stopping of detections by specifying an expiry date when calling
start()
. The expired detection will cause theStartStatus
to becomeSTART_EXPIRED
. - Support additional fine-tuning of the SDK's disk usage quota.
- Rare crash caused by a NullPointerException in the ContinuousSensorStreamService class.
- Remotely configurable sensor collection rate for non -R SDK versions.
- Relax the high accuracy location mode requirement. Detections will also work with battery saving mode.
- Occasional excessive wake-ups on Samsung devices.
- Rare issue where duplicate detection payloads are uploaded to the server.
- Rare issue where an invalid waypoint is added to a trip.
- Support adding trip metadata during an ongoing trip. See
addTripMetadata()
. - Support asynchronous user linking. See
setMetaUserLinker()
. - Send user-agent info to API calls.
- Internal changes to user linking, sdk configuration updates, and SDK heartbeat data.
- Issue related to incorrectly timed activity transition events supplied by play services.
- Batched payload submission.
- Voip call detection.
- Improved trip detection.
- Screen on/off detection during trips.
- Deobfuscate
TripInfo
andStationaryInfo
classes used withUserActivity
. - Fix crash when targeting a pre-12.0.1 version of Google Play Location Services.
- Minor internal bug fixes and improvements.
- Support updating the SDK notification at runtime with
updateSdkNotification(Notification)
. - Ability to register for user activity updates (trips and stationary moments) with
setUserActivityListener(UserActivityListener)
.
- Fixed a rare issue where the location availability sdk status value is incorrect.
- Other minor bugs.
- Support overwriting the Sentiance API URL with
SdkConfig.Builder.baseURL(String)
. - App version code in the device info payload.
- Prevent creating very long stationaries when the device has been offline (no location updates or powered off).
- Include geofence exit triggering locations in trips.
- Drop payloads when the API responds with 413 (payload too large).
- Reschedule SDK tasks with changed criteria.
- Rare crash caused by shared SimpleDateFormat instance.
- Prevent stopping of incoming location fixes during trips caused by high frequency requests (1 per 10 secs or higher).
- Capture unexpected exceptions and errors during SDK init, and fail with reason
InitIssue.INITIALIZATION_ERROR
. - Minor detection improvement.
OnInitCallback.onInitFailure()
now passes aThrowable
as an additional parameter in case of the aforementionedInitIssue.INITIALIZATION_ERROR
.
- Stuck stationary issue.
- Alarms not triggering on Samsung.
- Upload device location-mode, battery-saving state, and battery optimization config to the Sentiance platform.
- Capture hourly heartbeat events to track SDK runtime.
- Support uploading select SDK events (e.g. heartbeat) to the Sentiance platform over mobile data.
TransportMode
enum obfuscation issue.
- Support for uploading SDK logs over mobile data.
- Detection improvements to some Samsung and Huawei devices.
- Prevent Sentiance credentials change for an already authenticated user (init will fail with
CHANGED_CREDENTIALS
). - Prevent premature user access token refreshes.
Sentiance.isInitialized()
is now deprecated. UseSentiance.getInitState()
instead, which returns anInitState
enum.
- Minor bug fixes.
- Ability to disable battery optimization for improved detections (see here).
- New
SdkStatus
fields.isBatteryOptimizationEnabled
isBatterySavingEnabled
isBackgroundProcessingRestricted
- Updated min required Google Play Location Services version to 12.0.1.
- Improved detections.
- Minor bug fixes.
android.permission.FOREGROUND_SERVICE
permission required for Android 9.
- Updated target API to 28.
- Bug fixes.
- Improved detection algorithm.
- Bug fixes.
- Support for sending mocked locations.
- Improved detection algorithm.
- Minor bug fixes.
- Provide the ability to set the SDK's notification ID.
- Improve stationary detection.
- Fix google play console warning related to AWS credentials.
- Disable SDK notifications for triggered trips flavor when no trip is ongoing.
- Prevent LocationService from crashing during startup.
- Stationary detection improvement.
- More SDK logging.
- Removed explicit allowBackup param from manifest.
- Wakelock prevention and other minor fixes.
- Support for meta users.
- Remotely configurable required location providers.
- Prevent automatic detections in triggered trips mode.
- Location parameter of
CrashCallback.onCrash()
is now nullable. - Vehicle crash detection algorithm update.
- Various bug fixes.