Exemplo n.º 1
0
    void onBondStateChanged(MLBluetoothLE.Device device, MLBluetoothLE.BondState state)
    {
        print("onBondStateChanged");

        if (state.Equals(MLBluetoothLE.BondState.Bonded))
        {
            print("Device bonded!");
            MLBluetoothLE.DiscoverServices();
        }
    }
Exemplo n.º 2
0
    void onBluetoothConnectionStateChanged(MLBluetoothLE.Status status, MLBluetoothLE.GattConnectionState state)
    {
        print(status.ToString());
        print(state.ToString());

        if (state.Equals(MLBluetoothLE.GattConnectionState.Connected))
        {
            print("Connected to keyboard");
            MLBluetoothLE.DiscoverServices();
            // MLBluetoothLE.CreateBond(device.Address);
        }
        else
        {
            print("Disconnected from keyboard");
        }
    }