Listeners/Callbacks
MOVE Models
SDK State Listener
Triggers whenever the MoveSDKState changes.
Set an MOVE SDK State listener usingsdkStateListener
(Android/iOS) API to anticipate handling the MOVE SDK State changes, start detection services when MoveSDKState is .ready
or handle.error
if occurred.
Parameter | |
Latest MoveSDKState. |
Auth State Update Listener
Triggers whenever the MoveAuthState changes.
Authentication Expiry
The host app is expected to monitor MoveAuthState updates via authStateUpdateListener
API and handle those changes accordingly.
Check Authentication updates and expiry for more details about authentication expiry and renewal.
Parameter | |
Latest MoveAuthState. |
Trip State Listener
Triggers whenever the MoveTripState changes.
Parameter | |
Latest MoveTripState. |
Trip Start Listener
Triggers whenever a trip actually starts.
Parameter | |
Date | The actual start time of the trip. |
Trip Metadata Provider
This triggers whenever a trip is ending, allowing the host app to append metadata along with that trip if needed.
Trip Metadata is only available for car, cycling, train, tram, metro, and bus items. Metadata is also unavailable if public transport data is sourced from POIs.
Parameter | Type | |
start / tripStart | Long / Date | Trip start timestamp / date. |
end / tripEnd | Long / Date | Trip end timestamp / date. |
Return |
A String dictionary of the trip's metadata. |
Device Status Callback
Triggers whenever MoveDeviceStatus changes. MoveDeviceStatus represents the current device's system permissions (for Android / iOS) and services status.
Parameter | |
Latest MoveDeviceStatus. |
Service Failure Callback
Triggers whenever MoveServiceFailures change.
Parameter | |
List of MoveServiceFailures. |
Service Warning Callback
Triggers whenever MoveServiceWarnings change.
Parameter | |
List of MoveServiceWarnings. | |
Initialization Listener
Represents the potential errors occurring when updating the MoveAuth.
Parameter | Type | |
error | An error to notify when the configuration could not be loaded from the server. |
Log Callback
Triggers whenever a new log event occurs.
Parameter | Type | |
log | String | New log event. |
value | String | Log value. Optional |
The SDK will trigger log messages to improve debugging.
Remote Config Change Listener
Since MOVE SDK v2.5
Will be triggered when the MoveConfig was successfully fetched from the server via updateConfig (Android) / update (iOS).
If the MoveConfig object couldn't be fetched from the server then a MoveConfigurationError ServiceUnreachable will be triggered.
Setup Authorization Callback
Since MOVE SDK v2.9
Will return the success or failure of the internal MOVE SDK authentication process during setup. (also see MoveAuthResult)
Device Discovery Listener
Since MOVE SDK v2.4
Will be triggered during a BDD - Device Discovery scan.
Parameter | |
results | List of MoveScanResult's |
MoveDevice State Listener / Callback
Since MOVE SDK v2.10.0
Will be triggered when the status of a registered MoveDevice changes. This MoveDevice must be previously registered. See chapters "Register Device" (Android, iOS)
Last updated