Reputation: 11
I want to make a data sharing app which uses WiFi-Direct where there's one Activity for the sender device where a QR Code would be displayed containing all the info about the device for other peers to connect to this one (like MAC Address , which device is the group owner, etc.)
The receiver devices would then scan the QR code and connect to the device after which the Sender would open the explorer to choose the data to send and then send it.
The Problem: I am not able to find any way to just connect the devices directly using the give data instead of first scanning and then connecting.
Can anyone help me for this?
Upvotes: -1
Views: 958
Reputation: 394
I think this tutorial will help you.. https://dzone.com/articles/android-device-matching-with-socket-programming
QRGEncoder qrgEncoder = new QRGEncoder(preSharedKey, null, QRGContents.Type.TEXT, smallerDimension);
ServerSocket server = new ServerSocket(6678);
Socket socket = server.accept();
Upvotes: -1