initializeDevice

abstract fun initializeDevice(name: String, deviceType: DeviceType, supportedCapabilities: List<DeviceCapability>): LocalDevice

Create a new device record for this application.

💾 This method alters the persisted account state.

This method registered a device record for the application, providing basic metadata for the device along with a list of supported Device Capabilities for participating in the "device commands" ecosystem.

Applications should call this method soon after a successful sign-in, to ensure they they appear correctly in the user's account-management pages and when discovered by other devices connected to the account.

Arguments

- `name` - human-readable display name to use for this application
- `device_type` - the [type](DeviceType) of device the application is installed on
- `supported_capabilities` - the set of [capabilities](DeviceCapability) to register
   for this device in the "device commands" ecosystem.

Notes

- Device registration is only available to applications that have been
  granted the `https:///identity.mozilla.com/apps/oldsync` scope.