createRegistration method
Create a device registration which can be used to configure this device for deployment.
This method is used when a device is connected and a registration for this device is needed in the deployment and hence in the deployment service. The registration is typically created from the device information of the real device, e.g., the ID, name, and BLE address of the smartphone or a connected Bluetooth device.
Implementation
@override
SmartphoneRegistration createRegistration() => SmartphoneRegistration(
deviceId: DeviceInfoService().deviceID,
deviceDisplayName: displayName,
platform: DeviceInfoService().platform,
batteryChargingState: HardwareDeviceRegistration.parseBatteryLevel(
batteryLevel,
),
hardwareName: DeviceInfoService().hardware,
deviceManufacturer: DeviceInfoService().deviceManufacturer,
deviceModel: DeviceInfoService().deviceModel,
operatingSystem: DeviceInfoService().operatingSystemName,
sdk: DeviceInfoService().sdk,
release: DeviceInfoService().release,
);