0
\$\begingroup\$

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

\$\endgroup\$

closed as unclear what you're asking by Seth Battin, Kromster, Anko, Josh Jul 23 '15 at 16:37

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

0
\$\begingroup\$

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 -

  1. Discover the devices
  2. Pairing and connecting devices
  3. One of the device needs to become server. It will open a socket and listen for connection.
  4. Other device(s) need to become client. They will try to connect to server.
  5. 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.

\$\endgroup\$
  • \$\begingroup\$ oh thank you Vinayak . Is the game engine necessary for that or can i do it with native api? \$\endgroup\$ – srinivas Jul 19 '15 at 8:08
  • \$\begingroup\$ @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. \$\endgroup\$ – Vinayak Garg Jul 19 '15 at 9:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.