Development Guides
First, the DriveMotion client instance needs to be created.
The initialize
method will only need to be called once.
DriveMotion Client Initialization
Import module, create a new instance of builder and set all needed data then initialize.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Note
- setDeviceId('deviceId') is optional, device id will be automatically generated in event if it is not set.
- setRunInBackgroundMode(true) will enable data collection while application UI is in background.
- setDriveDetectionMode(true) is optional, auto trip detection is enabled by default. This setting will control auto trip detection. Set the value to false enable manual start/stop drive operations.
API Reference
Methods
Initialize SDK with proper data:
1 |
|
Shutdown SDK:
1 |
|
You can start/stop drive in manual mode:
1 2 |
|
Get stored trips:
1 |
|
Get trip details:
1 |
|
Get current live trip details:
1 |
|
Get aggregated trips score:
1 |
|
Events
Subscribe to event emitter:
1 |
|
Following events are supported:
1 2 3 4 5 6 7 |
|