0

how I can locate the status of devices via Java API ?

  • at first, the current status
  • Then when something on status changes anything! Example diconnected

Thanks

1 Answers1

1

Status information about the device is usually contained in the managedObject. Getting this information can be simply done through querying the object with InventoryApi.

For realtime notifications you can take a look at the class InventoryRealtimeNotificationsSubscriber. You would subscribe to with the ID of the managedObject. You will receive all updates to the object itself (like status changes) while subscribed to it.

TyrManuZ
  • 2,039
  • 1
  • 14
  • 23
  • It is possible to subscribe to a parent MO to get notified when one of his child is deleted? Also, it is not possible to have out of the box support for this in the PlatformImplementation? like platform.getDeviceControlApi.getNotificationsSubscriber. – Jorge Jan 02 '20 at 18:01
  • Also noticed that InventoryRealtimeNotificationsSubscriber is deprecated. do you have any suggestions? Maybe ManagedObjectNotification ?Thanks! – Jorge Jan 02 '20 at 18:51