How do I check if "Automatic Vehicle Management" is turned on through the SDK?

Applies To

  • GO Device
  • MyGeotab SDK
  • pinDevice

Answer

The pinDevice field of the Device object determines whether that device's automatic vehicle management setting is turned off or on. If the field is set to false, the Automatic vehicle management setting will be set to Enable within the user interface (UI); if the field is set to true, the setting will be set to Disable within the UI.

Use the following to pull an individual device's automatic vehicle management settings:

api.call("Get", {
"typeName": "Device",
"search": {
"id": "<id>"
}
}, function (result) {
console.log(result[0].pinDevice);
}, function(e) {
console.error("Failed:", e);
});

Additional Notes

What is Automatic Vehicle Management?