Android Networking UDP PC
in
Android Processing
•
4 months ago
I am trying to network my android with my PC. This is my Setup:
Android <----------> router <--------------> internet <-------------> router <------------> server
OR
Android <----------------------------------------> router <-----------------------------------------> Server
My issue is that when I set up port forwarding and such on my router, my computer thinks that my android is the router. I need to know what IP address to reply too. This is my recieving code (UDP library):public void receive(byte[] data, String ip, int port) {
- public void receive(byte[] data, String ip, int port) {
- datastr = join(str(char(data)), "");
- println("Recieved Data From: " + ip + ":" + port + " Data: " + datastr);
- if(datastr.substring(0,1).equals("MR")) {
- storeMessage(datastr.substring(2, datastr.length()));
- }
- }
1