How can I open a specific port in android?
I have a server socket but the connection is rejected because the port is closed.
try {
ServerSocket server = new ServerSocket(2021);
Socket client = server.accept();
} catch (Exception e) {
// TODO Auto-generated catch block
a = false;
e.printStackTrace();
}