示例#1
0
 public void ResetSensorPeriod()
 {
     if (!FlowManager.Instance.UseSensorBaliza)
     {
         SensorTagGATTCallback.ResetSensorPeriod();
     }
     else
     {
         SensorGATTCallback.ResetSensorPeriod();
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
        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);
            }
        }