How to implement Multi Connect using WiFi Direct - android

I am developing an Android app where I want to share content with more than two devices using WiFi Direct. I am able to search for all the available devices but connect to only one. I want to connect to all the available devices that is I want to know how can I make multi connect using WiFi Direct?
http://anrg.usc.edu/ee579_2012/Group09/#wifidirect
I have used this link to make single connection.
Please tell if I can make connection with more than one device.

You can make multiple connections only if you are the group owner.If you are able to connect to only one device that means you are not the group owner. The device that you are connecting to is the group owner and can further connect to other devices.

Related

Sending and receiving data between devices in android over wifi connection

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

Which API/method does Xender use to bypass Wifi Security

I am amaze to see how Xender bypass all WIFI related security checks and can connect to any other device easily that have Xender running and then transfer files. In Android, conventionally we create a hotspot and other joins that hotspot but Xender seems to have its own way to connect to other devices(basically same as the conventional method). Is it WIFI direct or something else? I also want to do the same. Can anyone please give some light on this. Thanks in Advance!
It is a peer-to-peer connectivity. One mobile acts as a server and other as a client. And, to create the connection we have to connect the "sockets" of the two mobiles which are created dynamically.
As soon as these sockets get connected, we can send data in form of byte stream, which in the case of Wifi-Direct, is extremely fast.
The Wi-Fi peer-to-peer (P2P) APIs allow applications to connect to
nearby devices without needing to connect to a network or hotspot .
Wi-Fi P2P allows your application to quickly find and interact with
nearby devices, at a range beyond the capabilities of Bluetooth.
In case of Android's implementation of Wifi-Direct, having multiple servers is not possible. See the Android's reference. It says:
A p2p group consists of a single group owner and one or more clients.
In the case of a group with only two devices, one will be the group
owner and the other will be a group client
reference guide for connectivity can be found here

Can i connect multiple phone via WiFi in android

I need to connect multiple phones to each other using wifi, without there being any internet though.
So i was thinking if this can be done by turning on the hotspot on one phone and allow the others to connect to it, can this be done ?
Or is there any other way to connect multiple phones via wifi ?
Any help is appreciated .. thnQ
To send and receive UDP messages you can using the following technique:
https://code.google.com/p/boxeeremote/wiki/AndroidUDP
The simplest way to explain this is that the UDP packages can be transmitted on a network with no particular destination set. Applications can pick this up and then decide if they want to handle the message or not.
To connect the devices you can use either a mifi dongle or put one of the phones into tethering mode:
https://support.google.com/nexus/answer/2812516?hl=en
Of course this is limited in range to the hosting mifi or phone.

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.

Categories

Resources