AI-generated Key Takeaways
-
Setting
locationTrackingEnabled
tofalse
disables location updates and takes the vehicle offline when the driver ends their shift. -
Disabling location updates automatically sets the vehicle state to
GMTDVehicleState.offline
in Fleet Engine. -
Refer to the
updateVehicleState
documentation for handling potential failures when disabling location updates.
When the driver finishes their shift, you can disable location updates and take
the vehicle offline by setting locationTrackingEnabled
to false
.
Disabling location updates also sends a final vehicle update request to Fleet
Engine to set the vehicle state to GMTDVehicleState.offline
.
For special considerations on handling failures when disabling location updates,
see
updateVehicleState
.
Swift
vehicleReporter.locationTrackingEnabled = false
Objective-C
_vehicleReporter.locationTrackingEnabled = NO;