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