I'm trying to send/receive a string from an android device. I've been googling for the last 3 hours and I can't find anything that just works. the closest I got was this: fella
and I get these errors:
02-19 15:44:17.680 4680-4680/com.example.jelle.bluetoothconnector W/System.err﹕ at com.example.jelle.bluetoothconnector.BluetoothConnection.init(BluetoothConnection.java:38)
02-19 15:44:17.680 4680-4680/com.example.jelle.bluetoothconnector W/System.err﹕ at com.example.jelle.bluetoothconnector.BluetoothConnection.<init>(BluetoothConnection.java:25)
02-19 15:44:17.680 4680-4680/com.example.jelle.bluetoothconnector W/System.err﹕ at com.example.jelle.bluetoothconnector.ConnectorActivity.btnBluetooth_onCLick(ConnectorActivity.java:92)
02-19 15:44:17.680 4680-4680/com.example.jelle.bluetoothconnector W/System.err﹕ at java.lang.reflect.Method.invoke(Native Method)
02-19 15:44:17.680 4680-4680/com.example.jelle.bluetoothconnector W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:372)
can anyone help me? I just need some code that can send/receive a string via bluetooth to get me started
Thanks!
Bluetooth devices communicate using low-power radio waves on a frequency band between 2.400 GHz and 2.483.
The best and most comprehensive example is Android's official bluetooth chat example. You probably do not need to change most of the stuff. See this: https://github.com/googlesamples/android-BluetoothChat
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With