Device Configuration and Update

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


Update Device Information

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

  • device (required): The device object on which the operation has to be performed.
  • request (required): The request object containing the updated device information.
val request = UpdateDeviceRequest(
  name = "New Device Name", // The new name of the device
  location = "New Location", // The new location of the device
)
InstaVision.deviceServices.updateDeviceInfo(
  device = device,
  request = request,
  onSuccess = { device ->
    // The updated device object
  },
  onError = { error ->
    // The error object contains the error code and message
  },
)

Update Device Settings

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

  • device (required): The device object on which the operation has to be performed.
  • request (required): The request object containing the updated device settings.
val request = UpdateDeviceSettingRequest(
  isInPrivacyMode = true, // The new privacy mode status
)
InstaVision.deviceServices.updateDeviceSetting(
  device = device,
  request = request,
  onSuccess = { deviceSetting ->
    // The updated device settings object
  },
  onError = { error ->
    // The error object contains the error code and message
  },
)

Toggle Device Light Mode

To update the device light mode, The following method can be used:

  • device (required): The device object on which the operation has to be performed.
  • isOn (required): The new light mode status.
InstaVision.deviceServices.updateDeviceLightMode(
  device = device,
  isOn = true,
  onSuccess = { deviceSetting ->
    // The updated device settings object
  },
  onError = { error ->
    // The error object contains the error code and message
  },
)

This site uses Just the Docs, a documentation theme for Jekyll.