In my app I want to send and receive text message through bluetooth. I can see in my listview a list of paired device name and address.But when I am trying to send a text to a paired device nothing happens. In other device there is no text received.
Bluetooth transfer of photos from smartphone in Windows 10 Hi. I have just upgraded laptop to Windows 10 from 8.1 and tried sending photos from smartphone to laptop. Then when you want to send or receive through Blutooth just left click and choose either send or receive - choose the image to send from your phone, the message will arrive on. How to Transfer Apps between Android Phones via Bluetooth. By Robert Zak – Posted on Jun 25. Open the app and scroll down the list to the app that you want to Bluetooth-beam over to another device. Long-tap it, and checkboxes will appear, along with the familiar share and download icons at the top of the screen. Make Tech Easier may.
This is my Code to send message to a paired device.
Ekanta SwainEkanta Swain
1 Answer
the bluetoothchat sample is actually the perfect thing to use if you are new in using the bluetooth api.
assuming that you are using only one Activity for your application which is the BluetoothChat class :
for sending text to the device you are connected to, use the 'sendMessage(String message)' method in the BluetoothChat class to send text.
as for receiving and handling the text, you will find also handleMessage(Message msg) method somewhere in the bluetoothchat class then go this part:
see the readMessage String?
this is the text that that you receive from the other device , now you can handle it as you want.
then simply change the main layout that the BluetoothChat class refers to, then in BluetoothChat chat either comment or delete the parts that have errors which actually will be the parts in the UI u have deleted or changed.
i know the code may sound messy but this is the easiest way to use it quickly as possible and watching video tutorials or text tutorials for hours will just make it more complicated, believe me i tried this before.
user2469133user2469133
Not the answer you're looking for? Browse other questions tagged androidbluetoothstreamandroid-bluetooth or ask your own question.