React Native
Production Readiness Update
- 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.
- 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 here.
- Updated the Sentiance Android SDK dependency to version 6.4.
- Updated the Sentiance iOS SDK dependency to version 6.4.
- The iOS Podspec path is now
'../node_modules/@sentiance-react-native/core'
. Please update your Podfile if necessary.
- Multiple compatibility issues with React Native 0.65+.
- Autolinking for iOS projects. With this fix, you no longer need to manually specify the iOS pod dependency in your Podfile.
- 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 DrivingInsights package, which allows the subscription to, and retrieval of DrivingInsights and HarshDrivingEvents. This feature must be enabled by Sentiance before use.
- A short history of locations inside CrashEvent, which represent the preceding locations leading up to the crash event.
- Updated the Sentiance Android SDK dependency to version 6.3.
- Updated the Sentiance iOS SDK dependency to version 6.3.
- Updated the target Sentiance Android SDK version from
6.2.0
to6.2.+
.
- Transport waypoint and distance information to
TransportEvent
, which is part of the event list returned inUserContext
. Both waypoints and distance are based on unprocessed (i.e. raw) location data. - Venue information inside StationaryEvent, which is part of the events list returned in
UserContext
. - Venue significance and venue type information inside the
Venue
type. - Semantic time information inside to
UserContext
type.
- BREAKING:
startTimeEpoch
andendTimeEpoch
properties of objects returned part of theUserContext
are now of type 'numeric', instead of 'string', and represent the Unix epoch time in milliseconds. - BREAKING:
longitude
,latitude
andaccuracy
properties of anEventLocation
object returned part of theUserContext
are now of type 'numeric', instead of 'string'. - BREAKING: the
EventLocation
type of theUserContext
has been renamed intoGeoLocation
. - Corrected the misspelled
BICYCLE
TransportMode type in the user context type definition file. - Updated the Sentiance Android SDK dependency to version 6.2.
- Updated the Sentiance iOS SDK dependency to version 6.2.
- Updated the
isBatterySavingEnabled
andisActivityRecognitionPermGranted
fields of theSdkStatus
to cover iOS as well. (previously Android only)
- BREAKING: the
venueSignificance
andvenueCandidates
properties from theUserContext
type have been removed.VenueCandidate
andVisit
classes have also been removed. - BREAKING: venue
name
andlabels
properties are removed fromVenue
.
- Typescript definition for UserCreationOptions in the
core
package. npm i
installing an older beta package instead of latest stable, when no version is specified.
- 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 here.
- Support for car, bus, train, and tram/metro transport mode detection, part of the user's current context information.
- Updated the Sentiance Android SDK dependency to version 6.1.
- Updated the Sentiance iOS SDK dependency to version 6.1.
- BREAKING: vehicle and rail transport modes from the user's current context information
- The module names in the type definition files.
- Starting and stopping a trip on iOS via the core package.
- Relax the target Sentiance SDK versions, to include patches.
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 update 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.
- A function to check if a user exists on the device or not.
- Detection enabling and disabling functions that are persistent across app restarts, and that replace the SDK's start and stop functions.
userExists
andisUserLinked
functions that are accessible without having to initialize the SDK.setAppSessionDataCollectionEnabled(enabled)
isAppSessionDataCollectionEnabled()
- A Sentiance user creation function 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
linkUser
function that supports linking a user following the existing user-linking flow. - A
linkUserWithAuthCode
function that supports linking a user following the new authentication-code flow. - An
addSdkStatusUpdateListener
function that supports registering listeners to get notified of SDK status updates without having to manually register a listener to the corresponding native device event. - An
addTripTimeoutListener
function that supports registering listeners to get notified of SDK trip timeouts without having to manually register a listener to the corresponding native device event. - An
addSdkUserActivityUpdateListener
function that supports registering listeners to get notified of SDK user activity updates without having to manually register a listener to the corresponding native device event. - An
addVehicleCrashEventListener
function that supports registering listeners to get notified of SDK vehicle crash events without having to manually register a listener to the corresponding native device event. - 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.
- Renamed
getUserAccessToken
torequestUserAccessToken
- Changed the return type of the
reset
function fromboolean
toResetResult
- Changed the return type of
addUserMetadataField
,addUserMetadataFields
,removeUserMetadataField
,disableBatteryOptimization
,listenUserActivityUpdates
,startTrip
,stopTrip
,submitDetections
,updateSdkNotification
fromPromise<boolean>
toPromise<void>
. - Moved the
listenVehicleCrashEvents
,invokeDummyVehicleCrash
,isVehicleCrashDetectionSupported
functions to a separatecrash-detection
module. - Bumped the target Android Sentiance SDK version to 6.0
- Bumped the target iOS Sentiance SDK version to 6.0
init(appId, secret, baseURL, shouldStart)
initWithUserLinkingEnabled(appId, secret, baseURL, shouldStart)
start()
startWithStopDate(stopEpochTimeMs)
stop()
isNativeInitializationEnabled()
enableNativeInitialization()
disableNativeInitialization()
isThirdPartyLinked()
getValueForKey(key, defaultValue)
setValueForKey(key, value)
userLinkCallback(success)
listenUserActivityUpdates()
listenTripTimeout()
Last modified 1mo ago