MoveSdk class
MOVE SDK API.
Constructors
- MoveSdk()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
allowMockLocations(
bool allow) → Future< void> - Android only
-
deleteLocalData(
) → Future< void> - Deletes all the collected user SDK data stored on the device. This doesn't affect the SDK state.
-
finishCurrentTrip(
) → Future< void> - Ends the current ongoing trip.
-
forceTripRecognition(
) → Future< void> - Temporarily calibrates the SDK to highest detection mode.
-
geocode(
double latitude, double longitude) → Future< MoveGeocodeResult> -
Geocode address lookup at coordinates: (
latitude
,longitude
) Returns a result with a String atMoveGeocodeResult.result
or an error withMoveGeocodeResult.error
. -
getAuthState(
) → Future< MoveAuthState> - Returns the current authorization state.
-
getDeviceQualifier(
) → Future< String> - Get a unique Device Identifier to distinguish the device. This changes when a device is cloned. Returns a unique device identifier.
-
getErrors(
) → Future< List< MoveServiceError> > - Gets the current SDK failures Returns current service state. Empty if all good.
-
getMoveVersion(
) → Future< String> - Get Move SDK Version. Returns a version string.
-
getPlatformVersion(
) → Future< String> -
getRegisteredDevices(
) → Future< List< MoveDevice> > - Get a list of devices registered with the sdk to be scanned for during trip.
-
getState(
) → Future< MoveState> - Returns the current SDK state.
-
getTripState(
) → Future< MoveTripState> - Returns the current SDK trip state.
-
getWarnings(
) → Future< List< MoveServiceWarning> > - Gets the current SDK warniings Returns current service state. Empty if all good.
-
ignoreCurrentTrip(
) → Future< void> - Ignores the current ongoing trip.
-
init(
) → Future< void> -
initiateAssistanceCall(
) → Future< MoveAssistanceCallStatus> - Inititate an Assistance Call to emergency services. Returns a status wether the call succeeded.
-
keepActive(
bool enabled) → Future< void> - Android only
-
keepInForeground(
bool enabled) → Future< void> - Android only
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recognitionNotification(
MoveNotification notification) → Future< void> - Setup notification for Move SDK recognition
-
registerDevices(
List< MoveDevice> devices) → Future<void> - Register devices with the sdk to be scanned for during trip. All will be unregistered on shutdown.
-
resolveError(
) → Future< void> - Resolve standing SDK state error. Host app should call this API after resolving the raised errors. SDK will reevaluate the error state and update the SDK state accordingly.
-
setAssistanceMetaData(
String? assistanceMetadataValue) → Future< void> - Set metadata to be sent with assistance call or impact detection.
-
setAuthStateListener(
) → Stream< MoveAuthState> - Set a block to be invoked every time SDK authorization state changes. Important:
-
setDeviceDiscoveryListener(
) → Stream< List< MoveScanResult> > - Device listener fired on device scans during trips.
-
setDeviceStateListener(
) → Stream< List< MoveDevice> > - Device state fired on device connection change.
-
setLiveLocationTag(
String? tag) → Future< bool> -
setLogListener(
) → Stream< String> - Set callback to be invoked every time a new SDK log event occurs. Returns log string. Invoked every time log event occurs.
-
setRemoteConfigChangeListener(
) → Stream< MoveConfig> - Set a listener when the config changed in response to the useBackendConfig option.
-
setSdkStateListener(
) → Stream< MoveState> - Set a block to be invoked every time SDK state changes. Important:
-
setServiceErrorListener(
) → Stream< List< MoveServiceError> > -
Set a block to be invoked every time SDK warning status changes.
When the config passed in
setup(auth:config:)
tries to initialize services that are not available in the server config those services will stop and are reported in the to the provided listener. This is not supposed to happen in a correct setup. Additionally missing user permissions are also reported. Returns stream:List<MoveServiceError>
. Invoked in case of configuration or permission errors. -
setServiceWarningListener(
) → Stream< List< MoveServiceWarning> > -
Sets a block to get called when optional permissions for
the activated services are missing.
Returns stream:
List<MoveServiceWarning>
. Invoked in case of configuration or permission errors. -
setTripStartListener(
) → Stream< DateTime> - Set a block to be invoked when a trip starts. Returns stream with the trip start date. The listener is sent delayed after confirming a trip is valid, around 30s to 130s.
-
setTripStateListener(
) → Stream< MoveTripState> - Set a block to be invoked every time SDK trip state changes. Returns stream: latest SDK trip state. Invoked every time SDK trip state changes.
-
setup(
MoveAuth auth, MoveConfig moveConfig, {MoveOptions? options}) → Future< void> -
The SDK will setup and authenticate a user.
moveAuth
contains authentication data and tokens prepared by the app backend.moveConfig
indicates the configuration of the services which will be running.options
(optional) contains additional options for the MOVE SDK. Services inmoveConfig
must be enabled in the MOVE dashboard. -
setupWithCode(
String authCode, MoveConfig moveConfig, {MoveOptions? options}) → Future< MoveAuthResult> -
The SDK will setup and authenticate a user.
authCode
contains the authentication string which was fetched from the backend.moveConfig
indicates the configuration of the services which will be running.options
(optional) contains additional options for the MOVE SDK. Services inmoveConfig
must be enabled in the MOVE dashboard. Returns the success or failure of the setup. -
shutdown(
{bool force = true}) → Future< MoveShutdownResult> - Shutdown SDK shared instance.
-
startAutomaticDetection(
) → Future< bool> - Starts the required detection services stated in the Config that is passed on init. Starting the service will set the SDK to running state. Precondition:
-
startScanningDevices(
{List< MoveDeviceFilter> filter = const [MoveDeviceFilter.paired], String? uuid, int? manufacturerId}) → Stream<List< MoveDevice> > -
Starts scanning for devices that can be registered with the sdk
Scan can be filtered with
filter
, default includes only paired devices. For scanning beaconsuuid
andmanufacturerId
must be specified. Will stop when stream is closed. -
startTrip(
Map< String, String> ? metadata) → Future<bool> - Start manual trip
-
stopAutomaticDetection(
) → Future< bool> - Stops the automatic detection service. Stoping the service will set the SDK State back to ready. Precondition:
-
synchronizeUserData(
) → Future< bool> - Force sending all pending user data to server. Preconditions:
-
toString(
) → String -
A string representation of this object.
inherited
-
tripNotification(
MoveNotification notification) → Future< void> - Setup trip notification
-
unregisterDevices(
List< MoveDevice> devices) → Future<void> - Unregister devices with the sdk to be scanned for during trip
-
updateAuth(
MoveAuth auth) → Future< MoveAuthError?> - Deprecated. Token expiry is never delegated to the app. When a token is invalidated the app must shutdown the SDK instead.
-
updateConfig(
MoveConfig config) → Future< void> -
The SDK will attempt to change the client
config
, will call warning/error listener respectively. -
walkingLocationNotification(
MoveNotification notification) → Future< void> - Setup walking location notification
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited