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-09-03 UTC.
[null,null,["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eLocation updates can be stopped and the vehicle marked offline at the end of a driver's shift using specific function calls (\u003ccode\u003eDeliveryVehicleReporter.disableLocationTracking()\u003c/code\u003e or \u003ccode\u003eRidesharingVehicleReporter.disableLocationTracking()\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThis action triggers a final update to Fleet Engine, marking the vehicle as offline without including the driver's location.\u003c/p\u003e\n"],["\u003cp\u003eSetting the vehicle state to \u003ccode\u003eOFFLINE\u003c/code\u003e or disabling location updates prevents the vehicle from appearing in vehicle searches.\u003c/p\u003e\n"],["\u003cp\u003eVehicles can be marked as \u003ccode\u003eOFFLINE\u003c/code\u003e before or after enabling/disabling location updates, and the Driver SDK immediately communicates this status to Fleet Engine.\u003c/p\u003e\n"]]],[],null,["When the driver finishes their shift, you can stop location updates and mark the\nvehicle as offline by calling\n`DeliveryVehicleReporter.disableLocationTracking()` or\n`RidesharingVehicleReporter.disableLocationTracking()`.\n\nThis call schedules one final immediate update to Fleet Engine to indicate that\nthe vehicle is offline. This update does not contain the driver's location.\n\nSet the vehicle state to offline\n\nTo mark the vehicle as unavailable in vehicle searches, you can set the vehicle\nstate as `OFFLINE` or disable location updates. You can mark a vehicle as\n`OFFLINE` when you have not yet enabled location updates or when you have\nexplicitly disabled updates. The Driver SDK communicates the vehicle as offline\nto Fleet Engine immediately."]]