ปิดใช้การอัปเดตตําแหน่ง
เมื่อคนขับทำงานเสร็จแล้ว คุณสามารถปิดใช้การอัปเดตตำแหน่งและนำรถออฟไลน์ได้โดยตั้งค่า locationTrackingEnabled
เป็น false
การปิดใช้การอัปเดตตำแหน่งจะส่งคําขออัปเดตยานพาหนะครั้งสุดท้ายไปยัง Fleet Engine เพื่อตั้งค่าสถานะยานพาหนะเป็น GMTDVehicleState.offline
ด้วย
ดูข้อควรพิจารณาพิเศษเกี่ยวกับการจัดการกรณีที่ดำเนินการไม่สำเร็จเมื่อปิดใช้การอัปเดตตำแหน่งได้ที่ updateVehicleState
vehicleReporter.locationTrackingEnabled = false
_vehicleReporter.locationTrackingEnabled = NO;
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-02-28 UTC
[null,null,["อัปเดตล่าสุด 2025-02-28 UTC"],[[["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."]]],[]]