I am making an app that sends user data to a javascript server hosted locally. It sends the data fine when my phone is on WiFi, but it gives an error ('failed to connect to: "/MY_LOCAL_IP"("PORT")) when I turn off WiFi. Is it even possible to connect to my local ip when on 3g/4g?
Asked
Active
Viewed 647 times
1 Answers
0
when your phone is on WiFi it's working fine because your mobile and your PC connected to the same network.but when you will connect your mobile to 3g/4g your mobile will connect to the different network and you can't access localhost javascript server address.

asim mahmood Khan
- 275
- 2
- 9
-
Thank you Asim! I now host my server online instead off on localhost and it works fine. – Siebrand Romeyn Oct 04 '15 at 17:13