java – How to transmit a signal via bluetooth

Question:

Let's say I have two applications. When you press a button in the first device, it must send a command to another, so that the other … let's say, show the text.

Question: how to send signals via bluetooth to the second device so that when a specific command is sent from the first device, the second one "catches" this command and processes it in the listener?

PS By command, I mean any message, be it a string or a number, or something else that can be transmitted and recognized. Both devices will have bluetooth enabled, if required, there will be manual configuration.

Answer:

Check out the BluetoothChat example from the Android SDK.

Scroll to Top