it has been a long time with OP posts, but for those who can see it, this is a tutorial that I did to communicate your Android with the Node.js server:
(without additional library)
https://causeyourestuck.io/2016/04/27/node-js-android-tcpip/
This is a foretaste of what it looks like at the end:
Client socket = new Client("192.168.0.8", 1234); socket.setOnEventOccurred(new Client.OnEventOccurred() { @Override public void onMessage(String message) { } @Override public void onConnected(Socket socket) { socket.send("Hello World!"); socket.disconnect(); } @Override public void onDisconnected(Socket socket, String message) { } }); socket.connect();
Omar aflak
source share