Пример #1
0
        private async void Init()
        {
            PermanentSerialNumber = await _client.GetPermanentSerialNumberAsync();

            ProductSerialNumber = await _client.GetProductSerialNumberAsync();

            IsValidFirmware = await _client.GetFirmwareBinariesValidationStatusAsync();

            FirmwareVersions = await _client.GetFirmwareVersionsAsync();

            EphemerisCoverageDates = await _client.GetGpsEphemerisCoverageDatesFromDeviceAsync();

            LogVersion = await _client.GetLogVersionAsync();

            MaxStrappCount = await _client.GetMaxStrappCountAsync();

            PendingDeviceDataBytes = await _client.GetPendingDeviceDataBytesAsync();

            // var j = await _client.GetPendingLocalDataBytesAsync(); NullException
            RunningAppType       = (await _client.GetRunningAppAsync()).ToString();
            TimeZonesDataVersion = await _client.GetTimeZonesDataVersionFromDeviceAsync();

            await _client.SensorSubscribeAsync(SensorType.BatteryGauge);

            _client.BatteryGaugeUpdated += _client_BatteryGaugeUpdated;

            _client.BatteryUpdated += _client_BatteryUpdated;

            var userProfile = await _client.GetUserProfileFromDeviceAsync();

            DeviceName = userProfile.DeviceSettings.DeviceName;
            DeviceId   = userProfile.DeviceSettings.DeviceId;

            await InitDeviceTime();
        }