private async Task doBackgroundWork()
		{
			// Get info
			var batteryLevel = BBB_WP_Common.Device.DeviceInfo.RemainingChargePercent;
			var dischargeTime = BBB_WP_Common.Device.DeviceInfo.RemainingDischargeTime;
			var deviceId = BBB_WP_Common.Device.DeviceInfo.DeviceId;
			var isPlugged = BBB_WP_Common.Device.DeviceInfo.IsPluggedToPower;

			MeasurementService client = new MeasurementService();
			TileManager tileManager = new TileManager();

			tileManager.UpdateTile(batteryLevel, dischargeTime, isPlugged);
			await client.AddMeasure(deviceId, batteryLevel, isPlugged);
		}
Esempio n. 2
0
        private void updateTile()
        {
            if (!isTileUpdated)
            {
                // Get info
                var batteryLevel = BBB_WP_Common.Device.DeviceInfo.RemainingChargePercent;
                var dischargeTime = BBB_WP_Common.Device.DeviceInfo.RemainingDischargeTime;
                var isPlugged = BBB_WP_Common.Device.DeviceInfo.IsPluggedToPower;

                // Update tile
                TileManager tileManager = new TileManager();
                tileManager.UpdateTile(batteryLevel, dischargeTime, isPlugged);
            }
        }