停用位置信息更新
当司机结束班次后,您可以将 locationTrackingEnabled
设置为 false
,以停用位置信息更新并使车辆处于离线状态。
停用位置信息更新后,还会向车队引擎发送最终的车辆更新请求,以将车辆状态设置为 GMTDVehicleState.offline
。
如需了解停用位置信息更新时处理失败的特殊注意事项,请参阅 updateVehicleState
。
vehicleReporter.locationTrackingEnabled = false
_vehicleReporter.locationTrackingEnabled = NO;
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-02-28。
[null,null,["最后更新时间 (UTC):2025-02-28。"],[[["Setting `locationTrackingEnabled` to `false` 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."]]],[]]