Can i create a Stranger Chatting App?

how can i create a stranger chatting app i know that we can create a chatting app but how to connect to users who click on a button which will connect those users thank you.

hi @avaydevil44uo5,
the action of clicking on a button to chat with the selected user is the first step of a client-server connection. The chat app firstly download from the server which user are connected and who is not and shows you the relative buttons (i’m depicting it very simple). Send a message to someone means to push it to the db inside the server. If the user is online, the message will be delivered or will be stored into db and delivered as soon the user will be online.
So in a very schematic view, your app should notify the server you are online and available, then must retrieves pending messages (while you were offline) then wait for incoming messages pushed by the server or polled by itself. In the meanwhile the app will poll for online users. In every moment you can push a message to an online/offline user sending it to the server.
Hope it will help you
rob

I think the offline state is very consuming to browse. If it is accurate, it is difficult. We don’t have a server as big as Facebook.

It’s best not to respond to old topics.

1 Like