Extension and ServerSocket

I have a question. I am developing an extension that can serve a webpage/text on any given port (>1024 because for the ports below you need root access or something).

I managed to get it up and running and it works as intended, but the problem is, that it only works on localhost. If I want to access it with a different computer I get a connection timed out error. I am using NanoHttpd as a web server. I am using all the default methods the only difference is, that the “serve” method takes the body for the response from a different variable.
My extension has these privileges: android.permission.INTERNET, android.permission.ACCESS_NETWORK_STATE and android.permission.ACCESS_WIFI_STATE.

So to wrap up, why can’t I access my server from the WIFI network?


1 Like

probably someone knows an answer to your problem in the Open Source community