Synchronize vehicle's odometer
You can retrieve the vehicle’s odometer data from the DriveQuant servers by calling the following method:
Copy fun getOdometer (
vehicleId: String ,
listener: OdometerSyncQueryListener ,
type: SynchronizationType = DEFAULT
) This method have the following parameters:
The vehicle for which you want to get the odometer’s data
Can be DEFAULT or CACHE.
- DEFAULT will synchronize the vehicle’s odometer by calling the DriveQuant servers
- CACHE will retrieve the odometer data already synchronized in the local database.
OdometerSyncStatus , VehicleOdometer and VehicleOdometerHistory models are described in the References part.
Retrieve local vehicle’s odometer data
You can retrieve the vehicle’s odometer data stored in the DriveKit local database by calling the previous method but with the type parameter to CACHE.
Add odometer history
You can add a new entry to a vehicle’s odometer by calling the following method:
This method have the following parameters:
The vehicle id for which you want to add an history entry
The distance in km you want to set
OdometerAddHistoryStatus , VehicleOdometer and VehicleOdometerHistory models are described in the References part.
Update odometer history
To update an entry to a vehicle’s odometer, call the following method:
This method have the following parameters:
The vehicle id for which you want to update the odometer’s data
The history id for which you want to update the distance.
The distance in km you want to update
OdometerUpdateHistoryStatus , VehicleOdometer and VehicleOdometerHistory models are described in the References part.
Delete odometer history
To delete vehicle’s odometer entry, call the following method:
This method have the following parameters:
The vehicle id for which you want to delete the odometer’s history entry
The history id you want to delete
OdometerDeleteHistoryStatus , VehicleOdometer and VehicleOdometerHistory models are described in the References part.