Describes a simple Android Client Server Application
The repo contains two android projects. One is Server Application and the other is Client.
Run both applications on your devices.
For running locally, Find the IP of the device which is running the Server Application.
Change the SERVER_IP in the Client Application inside ClientActivity.
public static final String SERVER_IP = "192.168.1.155";
Make sure both devices are on the same network and are using the same PORT.
Go to the Client Application and tap "Connect Server"
It should show connected and now tap "Send Message to Server".
Open Server Application to see the message from Client.
If you are connecting to a Server, make sure the PORT you specified in the code is allowed to accept incoming socket connections.
Specify custom messages by entering the message in the TextField on both Applications.
https://www.coderzheaven.com/2017/05/01/client-server-programming-in-android-send-message-to-the-client-and-back/