Android bluetooth client server - android

I'm making a simple game on the similarity of the sapper. Now I want to add to my applications communicate via bluetooth. I found a few topics on the Internet, but I could not understand how it's done. Please help me understand how to make the bluetooth server-client communication

Try to look at this github repository https://github.com/polyclef/BluetoothChatMulti/tree/master/BluetoothChatMulti/src/com/example/android/BluetoothChatMulti

Related

Android Connecting Multiple Devices via WiFi Socets

I am looking to create a simple app that will help me better understand sockets and how they work inside of Android. My idea is to try and create a simple messaging app that will allow users to connect to the host phone and then send messages.
I am hoping that once a message is sent all phones connected to the host will be able to see the messages and reply.
My question is that as I am very new to Android, is there any material out there or tutorials that will guide me into getting this up and running or something similar? Has anyone else tried something like this before and are sockets the best approach to be using?

Android WiFiDirectDemo p2p connection working as server-client

I test WiFiDirectDemo that is available as Android example, it works as it should. Now this app work as Server-Client. What I want is to work as p2p. Both devices should be able to receive and send data.
I don't know how to achieve communication in both ways?
Any direction in the right way would be much appreciated.
It seems that both devices serves as client and server. And sending messages between is simple, Developer should just implement system for checking and acknowledgment.

android project for sending string to microcontroller via bluetooth

I want to make an application which should send a string over Bluetooth to a micro-controller..I am kind of new to android and don't know where to start..
if anyone could help me with code or what topics i should study to complete this project, it would be great help..
thanx in advance
You could visit the Bluetooth android documentation which shows you how to create a Bluetooth connection and retrieve data: http://developer.android.com/guide/topics/connectivity/bluetooth.html
It is the same basic principle but just need to modify that your android device only connects to the specific address which is your micro-controller. Then, I guess you done. Make sure that your micro-controller understands and can handle your Bluetooth messages.

Android phone and Bluetooth module sepecificatoin

I am quite new with Bluetooth communication using Android. I want to develop a sample project that is to ON and OFF different LEDs via Bluetooth by using Android phone, for this I would need a Bluetooth module to communicate with the LEDs.
Now my questions are:
1) What technical specification are required for Bluetooth module to communicate with android phones(I have two android phones having Bluetooth version V2.1 and V3.0)?
2) which company's Bluetooth module would be better for me in the above situation?
Please help me in this respect I would be very thankful to you for this act of kindness. Thanks in advance.
http://developer.android.com/reference/android/bluetooth/BluetoothDevice.html
Use the UUID specified there for SPP
The bluetooth adapter will work as a Server by default.So you should do Client programming on android side.
My project deals with sending data continuously,so I had to use HandlerThreads so that I don't block the UIThread.Since you don't need to send much data you can work directly on UIThread.So connecting as a client section of android documentation will do.

Ad-hoc communication (messaging) system over Android

I am looking for the feasibility of implementing an ad-hoc type messaging service on Android. Basically I want a several Android users to be able to communicate (text is enough at this point) without having a cellular connection. But there can be a centralized access point. For example a low-power computer with a wireless router.
What is the best way to implement something like this? I was thinking using XMPP. Could use the computer as the XMPP server and let Android users connect to it. Is this a reasonable approach?
Any suggestions are greatly welcomed.
Thank you.
Adhoc and XMPP fit together in this context as follows: the network connections between the phones are adhoc; XMPP defines client to client server-less messaging. Two issues need be solved:
1) The adhoc Android connections - not clear to me if this is generally possible
2) Finding an XMPP Android client library that supports the xep-0174 protocols. The Smack library supports this, and I think it currently runs in Android.
Since you are using a centralized access point, it is straight forward, you open a socket connection between the different devices and exchange the data you need. I am not sure why you call it ad hoc though.

Categories

Resources