Need Support in Websocket Integration in Android project

Job ID: 33117366

Budget: ₹2,000 – ₹2,500 INR

In one application, A user can connect another user when he is found online/available to connect. In this online/availabilty is checked by REST API. We need a websocket based connection...in which online status is available at real time basis.
We already have frontend andorid and backend developer, They are new to websocket integration. Need someone to guide them and implement requirement in following way

If a user disconnects internet or uninstalll app, and this connection breaks then this user's online status(availablity) must be changed to offline on realtime basis

Further, In present , WHen a user is found online, other users can send request to connect. This request is sent through firebase notification via REST API, when reciever recieves request...and acknowledge...again another api is hit to tell sender that he is connected....then both can interact in chat.

We need a websocket realtime connection, when a user is found online and a sender request is sent, Reciever accepts on realtime and connection is established.

Note - If user want to maintain his status online despite he has killed app/closed app. he can.
if reciever user has maintained status online and app is closed. Stll then sender should be able to send connection request to reciever (whose app is closed)