How do I transfer game commands between 2 android devices via bluetooth first of all is possible to do this??If possible then someone please help in doing so.Thank u
Asked
Active
Viewed 1,673 times
0
-
http://developer.android.com/guide/topics/connectivity/bluetooth.html – Ocelot Jul 18 '15 at 10:57
1 Answers
0
This is definitely possible. You should look at the Android developer documentation for bluetooth (Ocelot has posted the link).
At the minimum you will have to do this -
- Discover the devices
- Pairing and connecting devices
- One of the device needs to become server. It will open a socket and listen for connection.
- Other device(s) need to become client. They will try to connect to server.
- Once a connection is established, client and server can exchange strings of message. These strings can be your game commands.
From my own experience, I would say pay good attention to architecture design for exchanging commands. As it may soon become messy.

Vinayak Garg
- 221
- 1
- 9
-
oh thank you Vinayak . Is the game engine necessary for that or can i do it with native api? – srinivas Jul 19 '15 at 08:08
-
@srinivas: I am not aware of a game engine that provides bluetooth API, so you will have to go with native API probably, whether you use game engine or not. – Vinayak Garg Jul 19 '15 at 09:51