Services
API Interface / Flutter
Last updated
API Interface / Flutter
Last updated
Starts the required detection services stated in the passed on initialization. Starting the service will set the to .running
.
Returns false if the SDK is not in .ready
state.
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
.
Returns false if the SDK is not in .ready
state.
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.
Returns false if the SDK is not in .ready
state.
Ends the current ongoing trip.
Ignores the current ongoing trip.
When an Android application is in the background it may receive limited data (location, sensors, etc.). To improve this behavior, it is possible to put the application always in the foreground with a visible notification that cannot be discarded. Just because it's visible it doesn't mean that it is performing any data collection at all. So this should not have any significant battery impact at all.
Forces a permission recheck, useful for example after the motion permission request was given in iOS.
Used to force synchronizing user data with the SDK server. Limited to once per 2 minutes.
Returns wether data upload is still in progress.
Adds a Tag (=string value) to trip events. This tag information is added to the timeline data.
To clear the Tag pass null
as parameter.
Parameters
tag
String [a-z] [0-9]
and null
to clear the Tag.
Return values
true
Live Location Tag is applied.
true
Live Location Tag is cleared. (parameter null
)
false
Live Location Tag exceeds the limit of 200 characters.
false
Live Location Tag is blank or empty.
false
If the passed chars are not one of these [a-z] [0-9].
Initiate an assistance call to emergency services.
Precondition: The assistance call service needs to be configured in the MOVE dashboard. The SDK needs to be in ready or running state.
Parameters
data
String
A string to be sent with each assistance call or impact
The metadata string is set once, and then sent to the server with each and every manual assistance call and with AID report. The contents of the string can be anything, e.g. JSON data. The assistance data is persisted once set.
Geo-code address lookup.
Geocode will use the system's native Geocode API or fallback to contacting the MOVE backend to attempt a geo-lookup.
Parameters
latitude
double
GPS location latitude.
longitude
double
GPS location longitude.
Throttle: Geocode is limited to a maximum of 100 lookups per hour.
The native API may have its own throttling and maybe used up for the app calling this function.
Parameters
listener
Start scanning for devices which can be registered on the SDK for trip device discovery. A block will get invoked each time new devices are found.
filter
MoveDeviceFilter
Filter devices by type. See bellow.
uuid
string
UUID String required to scan beacons.
manufacturerId
int
Manufacturer ID needed to scan beacons.
Opens a stream which will receive a list of new unique devices scanned. Device scanning will be stopped when the stream is closed.
A list of filters can be specified to filter which devices to scan for:
paired
Scan for paired devices. Default
connected
Show the connected devices.
beacon
Scan for beacon devices. uuid
and manufacturerId
required.
Parameters
Opens a stream to receive updates when values of MoveHealthItems changed. See MoveHealtItem (iOS) / MoveHealthScore (Android).
Manually force the start of a trip, bypassing trip validation checks. This non-standard SDK usage may be feasible only in situations where active user input can be expected. Using the metadata parameter, self-defined information can be added to each trip which can be fetched from the .
Precondition: MOVE SDK must be inREADY
.
Manually starting a trip bypasses additional trip detection checks. Manually started trips must be ended with .
It is recommended not to use motionPermissionMandatory
or backgroundLocationPermissionMandatory
with this API, as they will be ignored.
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.
To save battery consumption, the SDK is using several triggers to start its data listeners. In case of trouble, these triggers can be circumvented by allowing the MoveSdk to stay active all the time. In that case the SDK is always monitoring required data and is therefore consuming more battery. Depending on the configuration, it may happen that the notification (see) is always visible to the user.
Gets the current;
Get the current .
Get 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.
Provide a block to be invoked every time changes.
The host app is expected to monitor updates viaauthStateUpdateListener
API and handle those changes accordingly.
Check for more details about authentication expiry and renewal.
Provide a block to be invoked every time changes.
Provide a block to be invoked every time changes.
Provide a block to be invoked every time changes.
After a the tag is also cleared.
New feature in MOVE SDK 2.x; configuration in MOVE dashboard pending - please .
Returns a promise with a .
Returns an object of type MoveGeocodeResult with either the Address as a result string, or a .
Provide a block to be invoked every time was successfully fetched from the server.
A callback returning a object after a successful server fetch.
Set a connection state listener to be fired when the Bluetooth connection state of a previously registered has changed.
listener ->
A callback returning the which connection state was changed.
Get a list of devices () registered to be discovered during trips.
Register devices () to be discovered during trips.
Unregister devices () to be discovered during trips.
Opens a stream to receive updates when devices are scanned for during trips. See .