send/receive data via Bluetooth

SnelleJelle picture SnelleJelle · Feb 19, 2015 · Viewed 13.9k times · Source

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:

can anyone help me? I just need some code that can send/receive a string via bluetooth to get me started

Thanks!

Answer

Kasra picture Kasra · Feb 20, 2015

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