Disable location updates
Stay organized with collections
Save and categorize content based on your preferences.
When the driver finishes their shift, you can stop location updates and mark the
vehicle as offline by calling
DeliveryVehicleReporter.disableLocationTracking()
or
RidesharingVehicleReporter.disableLocationTracking()
.
This call schedules one final immediate update to Fleet Engine to indicate that
the vehicle is offline. This update does not contain the driver's location.
Set the vehicle state to offline
To mark the vehicle as unavailable in vehicle searches, you can set the vehicle
state as OFFLINE
or disable location updates. You can mark a vehicle as
OFFLINE
when you have not yet enabled location updates or when you have
explicitly disabled updates. The Driver SDK communicates the vehicle as offline
to Fleet Engine immediately.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-29 UTC."],[[["Location updates can be stopped and the vehicle marked offline at the end of a driver's shift using specific function calls (`DeliveryVehicleReporter.disableLocationTracking()` or `RidesharingVehicleReporter.disableLocationTracking()`)."],["This action triggers a final update to Fleet Engine, marking the vehicle as offline without including the driver's location."],["Setting the vehicle state to `OFFLINE` or disabling location updates prevents the vehicle from appearing in vehicle searches."],["Vehicles can be marked as `OFFLINE` before or after enabling/disabling location updates, and the Driver SDK immediately communicates this status to Fleet Engine."]]],[]]