private void OnPairSelected() { if (AndroidUtils.ConvertConnectionStatus(device.ConnectionStatus) == 2) { BhapticsAndroidManager.Pair(device.Address); } }
private void OnUnpair() { if (device.IsConnected || (AndroidUtils.ConvertConnectionStatus(device.ConnectionStatus) == 2 && device.IsPaired)) { BhapticsAndroidManager.Unpair(device.Address); } }
public static bool IsNeededToScan() { var devices = GetDevices(); if (IsScanning()) { return(false); } if (devices != null) { for (int i = 0; i < devices.Count; i++) { if (devices[i].IsPaired && AndroidUtils.ConvertConnectionStatus(devices[i].ConnectionStatus) == 2) { return(true); } } } return(false); }