akexorcist / BluetoothSPPLibrary

[UNMAINTAINED][Android] Bluetooth Serial Port Profile which comfortable to developer application to communication with microcontroller via bluetooth
Apache License 2.0
1.7k stars 570 forks source link

Why is it necessary to use reflection to connect device #71

Open swallowsonny opened 7 years ago

swallowsonny commented 7 years ago

//tmp = device.createRfcommSocketToServiceRecord(UUID_OTHER_DEVICE); method = device.getClass().getMethod("createRfcommSocket", new Class[]{int.class}); tmp = (BluetoothSocket) method.invoke(device, 1);