I have the bluetooth device address I want to have variable transfer with ( I've use BluetoothAdapter to discover devices and ... )
Now I need an easy sample to use socket to send and receive variables... ( I need to use BluetoothSocket right ? )
I've seen Bluetooth Chat sample but I think many of it's codes are unusual for me, so I want to ask someone help me with an easy sample code to send an integer and receive a string easily, PLEASE.
I've checked bluetooth support and found device's bluetooth address before.
somethis like this I have :
BlutetoothAdapter mBluetoothAdapter;
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
string Address; // BluetoothAddress of wanted device saved into that
int IntToSend; // Integer I need to send
// HERE I need the codes to SEND MY INTEGER VARIABLE TO THAT DEVICE
// I NEED CODES TO LET ME SENT STRING FROM THAT DEVICE HERE
Can someone help me please ?
SOLVED : I've used this easy tutorial : http://manojprasaddevelopers.blogspot.com/2012/02/bluetooth-data-transfer-example.html
Because of low reputation I can't answer my question until next few hours, so I've edited my post. Anyway, Sorry If it wasn't a good question, please. :)
edit 2 : after all, used BluetoothChat sample, too... :)