The problem for me nothing gets executed after while loop? what’s the issue with that? (The lines after the end of while loop never gets executed)
client = serverSocket.accept();
BufferedReader in = new BufferedReader(
new InputStreamReader(client.getInputStream())
);
while ((line = in.readLine()) != null) {
Log.i("line",line);
line111 +=line;
Log.i("line111",line111);
}
//Any code below this is not executed
Log.i("shan","Shan");
Your while loop is stuck waiting on the socket for the next line. The source of the stream needs to close the connection at its end.