Here is my problem, I need to have a webserver on a wifi with no internet connection. Now I have developed a web app so i can access it through my android and/or ios devices.
The issue happens with devices that have mobile data available, it seems to look for the local ip address of the webserver on the internet.
Is there a way to tell it to look on the local network? I hope my question makes sense.
On api-21 and up, you can use the
openConnection()
method of the Network class, and open a connection that is specific to the WiFi networkFrom the documentation:
Here's how to use it: