Device Retrieval and Information

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


Get all devices in a space

To get the list of devices, The following method can be used:

  • spaceId (required): The space ID of the devices.
InstaVision.deviceServices.getDevices(
  spaceId = "spaceId",
  onSuccess = { devices ->
    // The list of devices
  },
  onError = { error ->
    // The error object contains the error code and message
  },
)

Get a specific device in a space

To get the device information, The following method can be used:

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

Get the device model information

To get the device model information, The following method can be used:

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

Check if the device supports cluster

To check if the device supports cluster, The following method can be used:

device.supportsCluster() // Returns true if the device supports cluster, false otherwise