Hi,
Been doing some android networking lately. Having some trouble actually sending the data back and forth. The following is a simple explanation of what i have running now.
Java -> Server (runs on the desktop)
-its job is to constantly listen on a port and connect clients. Once a client connects, it creates a new JFrame with a graphics class.(Basically a giant canvas) There is a separate thread that is always listening to the client.
Android -> Client
An android device is the client. Its job is to connect to the server, with a given IP/Port. Once the connection has been established, it changes (setView) the view to a canvas. On the canvas there is a box that moves based on touch input.
Objective
The box moves on the android screen, but it doesn't move in the JFrame window.
I think the information is not being relayed. I have tried dataOutputStream. But for some reason there is a major Lag in sending the information. (Not waiting for serverSocket)
Basically i want a real time updates. As the box moves on the android device, it should also move on the JFrame.
EDIT: In the Long run, i want to send a string of information, which can be used to play a simple lan game.
Been doing some android networking lately. Having some trouble actually sending the data back and forth. The following is a simple explanation of what i have running now.
Java -> Server (runs on the desktop)
-its job is to constantly listen on a port and connect clients. Once a client connects, it creates a new JFrame with a graphics class.(Basically a giant canvas) There is a separate thread that is always listening to the client.
Android -> Client
An android device is the client. Its job is to connect to the server, with a given IP/Port. Once the connection has been established, it changes (setView) the view to a canvas. On the canvas there is a box that moves based on touch input.
Objective
The box moves on the android screen, but it doesn't move in the JFrame window.
I think the information is not being relayed. I have tried dataOutputStream. But for some reason there is a major Lag in sending the information. (Not waiting for serverSocket)
Basically i want a real time updates. As the box moves on the android device, it should also move on the JFrame.
EDIT: In the Long run, i want to send a string of information, which can be used to play a simple lan game.