private async Task SaveTeksAsync(IList <TemporaryExposureKey> temporaryExposureKeys) { TemporaryExposureKeys teks = new TemporaryExposureKeys(temporaryExposureKeys, DateTime.Now) { Device = DeviceInfo.Model }; string fileName = $"{teks.Id}.json"; string json = teks.ToJsonString(); Logger.D(json); var filePath = Path.Combine(_teksDir, fileName); await File.WriteAllTextAsync(filePath, json); }
private async Task SaveTekHistoryAsync(List <TemporaryExposureKey> temporaryExposureKeys) { TemporaryExposureKeys teks = new TemporaryExposureKeys(temporaryExposureKeys, DateTime.Now) { Device = DeviceInfo.Model }; string fileName = $"{teks.Id}.json"; string json = teks.ToJsonString(); Logger.D(json); AndroidFile filePath = new AndroidFile(_teksDir, fileName); await File.WriteAllTextAsync(filePath.AbsolutePath, json); }