The Java server does not receive a file from a particular Internet connection. What an idea?


I have built an android app which takes a pictures and send it to a server running on my pc using Java sockets. The Server receives the picture successfully when I send it from my android mobile using the same wifi network with the one that pc-server uses but it doesn't receive the image when I am sending it from another place using different network or when I use my mobile phone internet megabytes. It seems like image get lost on the way to the server because the android app runs properly and never get into catch{} code to throw an exception. Any idea????

Your pc server is using a WiFi router to connect to the Internet. That router is acting like a firewall that you need to disable so you can access from outside your WiFi network.

The best way is to open some port and forward it to your server:

Then you could access from the outside. Remember to use the your external IP address and not the local one.