I have a program that has a few edittext boxes. Is there a way through bluetooth or wi-fi to allow two users to connect their devices to each other and when user1 types in their edittext, it updates on user2's edittext and visa-versa?
Asked
Active
Viewed 1,631 times
0
-
What exactly are you trying to achieve? Connecting two phones seems fine but without sending anything from first phone to second how can you synchronise their edittexts boxes ? – dark_shadow Nov 11 '11 at 17:01
-
I have a text game that shows the stats of a player. I want one device to be the host and the other devices to be clients. When a change is made to a player's stats, I want it to update to all connected devices. – user985908 Nov 11 '11 at 17:36
2 Answers
1
This is not a simple task, but here are some great places to start
- http://developer.android.com/guide/topics/wireless/bluetooth.html
- http://developer.android.com/resources/samples/BluetoothChat/index.html
the second one is especially interesting because it show how to connect with and do network communication over Bluetooth between two devices.

skynet
- 9,898
- 5
- 43
- 52
-
Thank you for the links. I am trying to everything through basic4android. Perhaps there isn't a library in b4a that could help me do this. – user985908 Nov 11 '11 at 17:37
-
I'm not familiar with that, but if it is just a re-packaging of Eclipse and the ADT and Android then it should work as this is an official demonstration app using built-in android libraries – skynet Nov 11 '11 at 17:49
1
You will be able to achieve this using the Basic4Android Serial library
What you can do is use a BluetoothAdmin object to find another device name and MAC address. While the other device is listening, you can use the connect function to connect the two devices.
You can find out more here

jb11
- 557
- 5
- 18