Megha Pawar
Megha Pawar

Reputation: 115

How to create group chat using firebase in android app

I am trying to create groups of some selected users on firebase.

But firebase creates group of all users available on firebase database. Is it possible to create group of list of users (not all) programmatically? Any hint may be very helpful to me..

Upvotes: 4

Views: 9980

Answers (2)

Muhammed Fasil
Muhammed Fasil

Reputation: 8566

It is not possible group chat with Firebase because client is not capable for listen multiple nodes at a time . Here i am attaching some other platforms that would be support whole features of popular chatting applications like whats app.

1 . Back end servers

-Openfire :- Its free and open source and good for developing applications like Telegram , But security is your own risk

-ejabberd :- It is a XMPP server also commercial use is payable, Whatsapp is running on this platform.

-Tigase :- It is another one for achieving the XMPP communication

Other client SDKs are there for creating XMPP client

-smack :- Its free and open source, but now its only for android platform, iOS pods will coming soon.

-Chat SDK :- Its free and open source but only for firebase , It is payable for XMPP version

Upvotes: 1

ColdSpike
ColdSpike

Reputation: 196

Try to add the users you need in a group under separate child. for example let one child contain all the users and then create another child in root of your database that is a group.

root
 -users
  --user1
  --user2
  --user3
 -group1
  --user1
  --user10
 -group2
  --user5
  --user3

You can add these users in different groups by either reading all the users and then sorting them in different groups or while creating the user for the first time add it to both users and any group.

Upvotes: 2

Related Questions