First of all, I know, there were people having the same problem BUT their fixes does not work for me.
So the exception that I get is:
java.net.BindException: bind failed: EACCES (Permission denied) on line "serverSocket = new ServerSocket(port);" and i cant figure out where the problem is. I tryed:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
Checking for premission:
if (ContextCompat.checkSelfPermission(this, Manifest.permission.INTERNET) != PackageManager.PERMISSION_GRANTED) {
and the last thing that i tryed was using different ports including below and above 1024.
please help
EDIT: I just had Facepalm moment, i created dialog where i type port in BUT i forgot to pass the value so all that time it tryed to connect over port 1000 (that is unavalible in linux and unix systems), so anyways, thanks for stoping by over this thread and im sorry for wasting any of you guys time