public List <BluetoothDeviceInfo> GetPariedDevices() { string bondDeviceList = AndroidBridgeInstance.Call <string>("getPariedDevices"); List <BluetoothDeviceInfo> result = JsonConvert.DeserializeObject <List <BluetoothDeviceInfo> >(bondDeviceList); return(result); }
public void SendData(List <byte> sendBuffer) { AndroidBridgeInstance.Call("sendData", sendBuffer.ToArray()); }
public void SearchDevices() { AndroidBridgeInstance.Call("searchDevices", true); }
public bool IsBluetoothEnabled() { return(AndroidBridgeInstance.Call <bool>("isEnabled")); }
public void InitializeBluetoothDevice() { m_internalBluetoothMessageHandler = new AndroidBluetoothMessageHandler(); AndroidBridgeInstance.Call("initializeBluetoothForUnity", m_internalBluetoothMessageHandler); }
public BluetoothStatus GetBluetoothDeviceStatus() { BluetoothStatus bluetoothStatus = (BluetoothStatus)AndroidBridgeInstance.Call <int>("getCurrentBluetoothStatus"); return(bluetoothStatus); }
public void Disconnect() { AndroidBridgeInstance.Call("disconnect"); }
public void ConnectToDevice(string remoteDeviceMacAddress) { AndroidBridgeInstance.Call <bool>("connectDevice", remoteDeviceMacAddress); }
public void SendData(List <byte> sendBuffer) { AndroidBridgeInstance.Call("sendMessage", Array.ConvertAll(sendBuffer.ToArray(), b => unchecked ((sbyte)b))); }
public string GetConnectedDeviceName() { return(AndroidBridgeInstance.Call <string>("getConnectedDeviceName")); }