停用位置更新功能
司機下班後,您可以將 locationTrackingEnabled
設為 false
,停用位置更新功能並讓車輛離線。
停用位置更新功能時,系統也會向車隊引擎傳送最終車輛更新要求,將車輛狀態設為 GMTDVehicleState.offline
。
如需關閉位置更新時處理失敗情況的特殊注意事項,請參閱 updateVehicleState
。
Swift
vehicleReporter.locationTrackingEnabled = false
Objective-C
_vehicleReporter.locationTrackingEnabled = NO;
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-01-14 (世界標準時間)。
[null,null,["上次更新時間:2025-01-14 (世界標準時間)。"],[[["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."]]],[]]