Sending and receiving data between devices in android over wifi connection - android

I want to transmit some data (text) between android devices.
Like zapya or shareIt applications.
I don't want to connect each device to a same modem.
I want just to connect two devices over wifi and send/receive data between them.
How can i implement this in android ?
Thanks in advance :)

You'll find what you're looking for here Wifi P2P Android
You can create a peer to peer network between two devices that support it and send arbritrary data between both

Related

How to send and receive Data between Devices with Flutter/Dart?

I would make an app to play with playing cards.
To make this app:
I must send and receive data between devices.
I would make it with mobile hotspot, so that all devices are in the same wireless network, also without connection to the internet.
How can I do this with Flutter/Dart? Any ideas? Or better with bluetooth? Or with internet connection?
I think that a way of doing this is with mobile hotspot, by using the UDP protocol of communication between devices through a local network.
There is a class in a flutter that does what you are looking for, just search for send and receive via UDP in flutter and you will find a lot of ideas, projects, classes, and packages.
Is P2P communication between devices a hard requirement for you? Otherwise, Firebase real-time database will be an easy solution for you. This will require internet connection.

How to transfer data between two devices using WIFI-Direct?

I want to write a chat application which uses WIFI-Direct only and there are no internet or routers at all.
I've created a Wi-Fi P2P Application which can see other devices with enabled WIFI-Direct. The android guides are here : Wi-Fi Peer-to-Peer
Two devices connects to each other with WIFI-Direct and the specifications of connected device will be shown in my app.
At this point, I don't know what is the best way to transfer data between this two devices? Socket programming or what else ways are there to do this?
For Socket programming paradigm, the data flow will be from client to server only, how to transfer data in both directions?

Peer-Peer communication using wi-fi in android

I want to send a message from one android device to another through Wi-Fi.
I have two android devices , and Portable wifi Hotspot is enabled on both. I developed an application which displays a list of availabe wifi devices , and both of the devices lists each other.
Now I want to connect both and send a text from one device to another. What I know is that wifi transmitters transmit a beacon frame , which contains SSID , BSSID etc.
What should I do ? Should I apply a socket operation , but I don't have IP address.
I haven't done this so I can't provide code, but the answer is to use wifi- direct. http://developer.android.com/guide/topics/connectivity/wifip2p.html. That allows you to discover devices on wifi with you, then send data to them via normal sockets.
There is a wifi-direct sample app with the SDK.
Samsung recently released a simple API intended to make P2P apps easier to build - http://developer.samsung.com/chord
It only works on Android 4.0 and up, but it appears that is also the case with Wi-Fi Direct.

how to initiate wifi direct pairing using NFC

my goal is to connect two or more devices via wifi direct. i only want to connect them i dont need any protocol to move data or anything. just the process of finding other devices that have my app and connect when tab together using NFC.
thanks in advance.

How to connect two Android devices over GPRS or 3G?

I want to connect two phones over 3G or GPRS to send a stream of data continually. One phone will act as client that will send data and the other phone will act as the server to receive and display the same data. Is it possible to stream data without using a server?
No. You will have to use some kind of server definitely.
Not really, I have been working on a similar project using TCP/UDP packets, but the big issue is with finding the other phone.
The best way is to use a system similar to O-Auth to connect with an external server on the internet
and send/recive data through that, but I don't have much experience with that.
My project used UDP to find a server on a wifi network and get its ip, then connect to it through tcp,
but you just as easily use a server on the web to do it over any mobile data connection.
If you wanted I will gladly send you some of my tcp code as a starting point.
Swift
You can't connect two devices directly though the cellular data. You need an intermediate server.
If on the other hand you are going to connect them through wifi, then you can use sockets to connect both of them together.
If the distance between both the devices is less, then you can also try out transfer over bluetooth.

Categories

Resources