Android Connecting Multiple Devices via WiFi Socets - android

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?

Related

Android Communication through ad-hoc

I need Communication for my android applications to send and receive some messages without using internet and server. I think I should use something like ad-hoc or bluetooth but I have no idea which is better and where to start. can anyone show me a way to start?

how can i send message from an android device to another android device using Wi-Fi Peer-to-Peer?

I want to create chat application using wifi peer to peer,am already establish communication between devices using docs ,but am little bit confused when am trying to transfer data.First time am working with peer communication,Please help me how can i achieve this.is there any sample chat app for reference. Thank you

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.

Getting started with Bluetooth development for Android: Suggestions for test application

I have a task to integrate a Bluetooth device into my application. Now my requirement is very specific. The device has a specific communication protocol which relies on certain ACKs but I figured it would make my development much easier if there was a program that let me test communication with the device.
I was wondering if there was a program for Linux, or perhaps a simple Android program which let me communicate with any Bluetooth device with a series of pings using data I enter and simply log the responses.
EDIT: I might not have been clear enough in my question.
I have a scale that I need to integrate into my application, and the scale has a protocol similar to this:
Get a specific byte string from device
Transfer data
Transfer packet for disconnection
Receive acknowledgement for disconnect packet
Disconnect
Now when I have to issue a POST request from my application, I usually build a test script online so I can test if the POST works properly.
I was wondering if there was something similar I could do with the device.
Thanks
Your question is not clear enough. To communicate with a BT device, you need to know what profile your device supports. Depending on that, you can find a way in Android or Linux or windows to communicate with the device.
The simplest way is to open an RFCOMM channel from android/PC and transfer data to and from the device. For this the device has to support the serial port profile (SPP). If you want to do this in Android, look for the BluetoothChat example from google.
If you want to use a PC/mac/linux look at the Bluez python module. It's really simple to use. There are plenty of other options too..
I was looking for something like SENA BTerm. It lets me connect to any device and send whatever data I wish.
It is an extremely useful tool for testing my code.
http://www.sena.com/download/manual_bterm/overview.html is where you can find it.

How to get two android devices talking through an app on a lan using wifi

I have a small project I am working on and one of the technical problems I am running into is finding a easy way to get one app on one android device to push data to another app on another android device via lan.
I do not want to have to resort to the push API or other similar solutions in case there is no Internet connection.
I was wondering if anyone had any suggestions for this.
Thanks.
You could definitely use Java Sockets. Open a ServerSocket on one device and connect to it using a socket on the other device. You can then send and receive whatever data you want.

Categories

Resources