Firmware Management

Pre-requisite: The user has to be signed in to perform the following operations.


Get the latest firmware version for a device

To get the latest firmware version available for the device, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID of the device.
InstaVision.deviceServices.getLatestFirmwareVersion(
  spaceId = "spaceId",
  deviceId = "deviceId",
  onSuccess = { latestFirmwareVersion ->
    // The object contains the latest firmware version
  },
  onError = { error ->
    // The error object contains the error code and message
  }
)

Initiate a firmware update of a device

To update the firmware of the device, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID of the device.
  • request (required): The request object containing the firmware version to be updated.
val request = UpdateFirmwareRequest(
  version = "1.1.1" // The firmware version to be updated
)
InstaVision.deviceServices.updateFirmware(
  spaceId = "spaceId",
  deviceId = "deviceId",
  request = request,
  onSuccess = {
    // The firmware update has been initiated successfully
  },
  onError = { error ->
    // The error object contains the error code and message
  }
)

Get the status of the firmware update of a device

To get the status of the firmware update, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID of the device.
InstaVision.deviceServices.getFirmwareUpdateStatus(
  spaceId = "spaceId",
  deviceId = "deviceId",
  onSuccess = { firmwareUpdateStatus ->
    // The object contains the firmware update status
  },
  onError = { error ->
    // The error object contains the error code and message
  }
)

Get the latest firmware version for all devices in a space

To get the latest firmware available for the device, The following method can be used:

  • spaceId (required): The space ID of the device.
InstaVision.deviceServices.getLatestFirmwareForAllDevices(
  spaceId = "spaceId",
  onSuccess = { latestFirmwareVersions ->
    // The object contains a list of latest firmware version
  },
  onError = { error ->
    // The error object contains the error code and message
  }
)