private void StopScan() { if (!Scanner.IsScanning) { return; } HandlerScanTimeout?.RemoveCallbacks(OnTimeoutScan); Scanner.StopScan(); ProgressScanning.Visibility = ViewStates.Invisible; ButtonScan.SetText(Resource.String.BtnScanStop); }
private void StartScan() { if (Scanner.IsScanning) { return; } BcoreInfos.Clear(); Adapter.NotifyDataSetChanged(); Scanner.StartScan(); ProgressScanning.Visibility = ViewStates.Visible; ButtonScan.SetText(Resource.String.BtnScanStop); HandlerScanTimeout = new Handler(); HandlerScanTimeout.PostDelayed(OnTimeoutScan, TimeoutLength); }