async Task <BuzzerApi> EnsureApi() { if (buzzerApi != null) { return(buzzerApi); } buzzerApi = await BuzzerApi.GetBuzzerApiAsync(); //ProcessFutureErrorStates (buzzerApi); return(buzzerApi); }
async void ProcessFutureErrorStates(BuzzerApi api) { while (true) { var result = await api.GetNextStateStatusAsync(); if (!result) { Snackbar.Make(mainCoordinator, "Failed to send buzz", Snackbar.LengthLong) .Show(); } } }