Device manager

Saved health data in Samsung Health can come from various connected devices like a Galaxy Watch, Galaxy Ring and a weight scale. DeviceManager provides source device information of saved health data in Samsung Health’s data store.

For instance, when Galaxy Watch measures blood oxygen level, the watch’s measured data will be synchronized to a paired Android smartphone’s Samsung Health. And if the user measures weight with a connected weight scale device, that weight data will be synchronized too. In this case, if the DeviceManager.getDevices() API is called with DeviceGroup.WATCH, the Galaxy Watch’s Device object will be retrieved.

Device information

The Device object includes:

  • Device ID
  • Device type like DeviceGroup.WATCH or DeviceGroup.ACCESSORY.
    In case of the ACCESSORY device group, AccessoryType provides an additional detailed type.
  • Device's manufacturer name
  • Device model name
  • Device name costumed by the user

You can get device information for a specific device ID or a device type.

Device registration

Registering a device as a data source is available using DeviceManager when performing data writing operations. DeviceRegistrationRequest.registerDevice(), where you provide your own Device object and a device seed, is used to create a registration request. A device seed is a unique string for the device such as its Bluetooth MAC address or serial number. This request can be sent through DeviceManager.registerDevice() to register a new device source, and it will return the ID of the newly registered device. It is used for performing queries such as data insertion.

Registered devices can be retrieved in various ways, such as using DeviceManager.getDeviceBySeed(), where the unique seed used for registration is provided, or by DeviceManager.getOwnDevices(), which returns a list of devices registered by the app package name.