Open nitnahtnit opened 4 years ago
Android version ?
@triniwiz running on Android 9
Since you are using v9 a quick fix would be to add android:usesCleartextTraffic="true"
to your application tag in the AndroidManifest but the perfect solution would be adding it to your networkSecurityConfig ..... example
oh I almost forgot you will need to use the ip of your computer not the localhost address
That worked well, thank you. The server is programmed to shut down once client disconnects, is there a way to keep the connection alive? SocketIO is closing connection after sending the first payload
I'm trying to send data to a local c++ tcp/ip server listening on 127.0.0.1:27015 using:
var socket = new SocketIO("http://127.0.0.1:27015"); socket.connect();
socket.on('connect', () => console.log('connected')); socket.emit('test', 'hi');
But the server is not receiving anything. I am on same network and running from a physical android device. Can this be done? I need to send data from android to windows pc.