Services
iOS
Last updated
iOS
Last updated
Shared Instance
Use the shared instance as your interface to the MOVE SDK.
Starts the required detection services stated in the passed on initialization. Starting the service will set the to .running
.
Precondition: SDK should be in.ready
Stops the automatic detection service, including all SDK services like driving detection, points of interest, walking and places. Stopping the service will set the back to .ready
.
Precondition: SDK should be in.running
.
Temporarily calibrates the SDK to the highest detection mode.
In order to optimize battery consumption, the SDK goes through different detection modes with different battery consumption levels, depending on the user's current behavior and activity. In general, the SDK is responsible for alternating between those different detection modes.
The SDK also provides hosting apps this API to call if they have their own reasons (like buttons, sensors or beacons) to believe that the user is starting a trip. This will make sure the SDK is on the highest detection state to detect the trip faster.
Ends the current ongoing trip.
Ignores the current ongoing trip.
Return
Latest SDK State
Callback
Return
Latest SDK State
Callback
Return
Callback
Return
Callback
Provide a block returning bundle of key-value pairs to be appended to the trip metadata before the trip finishes.
Host apps can use this API to add any app-level information (for ex. Böuetooth beacon detected, foreground/background time, etc) to append to a trip as metadata. This metadata will be forwarded back along with the trip when fetched by the client-server, so the host app can utilize it in its app. Note: The SDK will not use this metadata element in any way, it is just passed through to the product.
The block provides the trip's start and stop times. Make sure to only include metadata events that are relevant for the given start and end periods.
Callback
Block that gets invoked on every trip finish. The block provides the trip's start and stop times.
Usage Example
Provide a block to be invoked every time a new SDK log event occurs.
Callback
Block that gets invoked with every new log event.
Toggles console logging enabled state.
This doesn't affect recieving the logs via setLogListener(_ listener: MoveLogCallback)
API.
Enabled by default.
Parameter
enabled
Boolean that sets SDK console logging to enabled or not.
Shutdown SDK shared instance.
Precondition: SDK should be initialized.
Used to force synchronizing user data with the SDK server. Limited to once per 2 minutes.
Returns FALSE in case there are Timeline-relevant packages in the queue that remain to be sent to the SDK Backend; and it returns TRUE in case the queue is empty.
Parameter
auth
The user's updated Auth object with the new token.
Callback
completion
Precondition: SDK should be in.running
.
This API will end the ongoing trip and set back to .idle
. The SDK is responsible for detecting the trip start and end points. The SDK also provides hosting apps this API to call if they have their own reasons (like sensors or beacons) to believe that the user's trip has ended.
Precondition: should be in an active trip.
More information about trip states can be found in .
This API will set the ongoing to .ignored
. Data of ignored trips is purged and not sent to the server.
Precondition: should be in an active trip.
Gets the current.
Provide a block to be invoked every time changes.
Set the listener before initializing the SDK to anticipate the SDK changes triggered by the initialization API.
Here the host app can start the SDK services when is.ready
or handle errors if occurred.
Block that gets invoked every time is changed and provides the updated .
Gets the current .
Provide a block to be invoked every time changes.
Block that gets invoked every time is updated.
The host app is expected to monitor updates viaauthStateUpdateListener
(Android / ) API and handle those changes accordingly.
Check for more details about authentication expiry and renewal.
Gets the current .
Current
Provide a block to be invoked every time changes.
Block that gets invoked every time is changed and provides the updated .
Gets the current .
Current
Provide a block to be invoked every time changes.
Block that gets invoked every time is changed and provides the updated .
Deletes all the collected user SDK data stored on the device. This doesn't affect the .
Precondition: should be initialized.
Stops SDK services, send the queued user data, and de-initializes the SDK. After that is executed, the will transit to .uninitialized
.
Updates SDK . On SDK auth expiry, the Builder.authStateListner will trigger expired state. The host app is expected to fetch a new using its product API key and pass it to the MoveSDK using the following API:
Block that gets invoked on auth update completion with an optional for potential updating errors.