protected override async void OnHandleWork(Intent workIntent) { var token = workIntent.GetStringExtra(ExposureNotificationClient.ExtraToken); var summary = await ExposureNotification.PlatformGetExposureSummaryAsync(token); // Invoke the custom implementation handler code with the summary info if (summary?.MatchedKeyCount > 0) { var info = await ExposureNotification.PlatformGetExposureInformationAsync(token); await ExposureNotification.Handler.ExposureDetectedAsync(summary, info); } }
protected override async void OnHandleWork(Intent workIntent) { Console.WriteLine($"C19R {nameof(ExposureNotificationCallbackService)}"); var token = workIntent.GetStringExtra(ExposureNotificationClient.ExtraToken); var summary = await ExposureNotification.PlatformGetExposureSummaryAsync(token); Task <IEnumerable <ExposureInfo> > GetInfo() { return(ExposureNotification.PlatformGetExposureInformationAsync(token)); } // Invoke the custom implementation handler code with the summary info Console.WriteLine($"C19R {nameof(ExposureNotificationCallbackService)}{summary?.MatchedKeyCount} Matched Key Count"); if (summary?.MatchedKeyCount > 0) { await ExposureNotification.Handler.ExposureDetectedAsync(summary, GetInfo); } }