public void ResetSensorPeriod() { if (!FlowManager.Instance.UseSensorBaliza) { SensorTagGATTCallback.ResetSensorPeriod(); } else { SensorGATTCallback.ResetSensorPeriod(); } }
public void CloseConnection() { try { //Device.Dispose(); if (!FlowManager.Instance.UseSensorBaliza) { SensorTagGATTCallback.Disconnect(); } else { SensorGATTCallback.Disconnect(); } } catch (System.Exception ex) { string title = this.GetType().Name + " - " + System.Reflection.MethodBase.GetCurrentMethod().Name; BalizaFacil.App.Instance.UnhandledException(title, ex); } }
public void bluetoothActivate() { try { BluetoothManager = (BluetoothManager)Android.App.Application.Context.GetSystemService(Android.Content.Context.BluetoothService); ScanCallback = new ScanCallback(); ScanCallback.DeviceDiscovered += OnDeviceDiscovered; SensorGATTCallback = new SensorGATTCallback(); SensorTagGATTCallback = new SensorTagGATTCallback(); //Desparea todos os dispositivos conectados no celular //UnPairedDevices(); //Thread.Sleep(100); //PairDevice(); } catch (System.Exception ex) { string title = this.GetType().Name + " - " + System.Reflection.MethodBase.GetCurrentMethod().Name; BalizaFacil.App.Instance.UnhandledException(title, ex); } }