private async Task UploadToCloud(TelemetryData telemetry) { if (skiped == 6) { skiped = 0; try { var settings = SettingsService.Instance; var credential = settings.GetCredentialFromLocker(); if (!string.IsNullOrWhiteSpace(settings.WebHost) && credential != null) { var webclient = new WebClientService(settings.WebHost, credential.UserName, credential.Password); await webclient.Login(); var result = await webclient.SendTelemetryData(telemetry); Debug.WriteLine($"Result: {result}"); } } catch (Exception ex) { Debug.WriteLine(ex); } } else { skiped++; } }