private async void StartGoogleAPI() { try { await _viewModel.StartENService(); bool isRunning = await _viewModel.IsRunning(); if (isRunning) { BackgroundFetchScheduler.ScheduleBackgroundFetch(); } if (await _viewModel.IsEnabled() && !await _viewModel.IsRunning() && await BluetoothStateBroadcastReceiver.GetBluetoothState(UpdateUI) == BluetoothState.OFF) { await _permissionUtils.HasPermissions(); // wait until BT state change will be completed await BluetoothStateBroadcastReceiver.GetBluetoothState(UpdateUI); } } finally { UpdateUI(); } }