How can i connect two random users in a chat, only two users?

i can’t find any way to connect two random users in a chat :thinking: :thinking: :thinking:

when an user click on a button then that user will connect to another user at a chat room

my question is how can i connect two random users in a chat, only two users?

I dont know about random, but you can connect 2 users in chat using firebase.

Anyone can help me :face_with_raised_eyebrow: :face_with_raised_eyebrow: :face_with_raised_eyebrow:

You are telling nothing about your app, please be more specific. Maybe show a screenshot of your data structure and the attached blocks.

i am not talking about my app because i am just asking there is any way to connect two random users in a chat because i can’t find any way to connect two random users :thinking: :thinking:

Sorry but your question really doesn’t make any sense for me.

Connect two random users?

Okay let’s assume you are using Firebase.
Let’s assume that you are storing usernames.
Also let’s assume you have a screen where 2 users can chat.
Now simply get the taglist from Firebase and select a random user from the taglist and redirect user to the chat screen by passing the value of the randomly selected item assuming the project bucket as username.

1 Like

i am not agree with you aditya singh

because if we pick a random tag and make the user id/username as a project bucket then if anyone again pick that same user name on bucket then he will also get the another user chat also then it will be like a group chat
by Ayush bhargav :sunglasses: :sunglasses:

1 Like

You can use firebase, you can do it logically.

1 Like

@Wallpaperli It’s simple just get all user names/id’s and store in a lablel and then select two random id afrom them with uding slect list item list (list name) index (should be a random number from 1 to lenth of user name /id variable)
Same for second user
Happy koding

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.