A nice tutorial that would be a lot more popular if it showed how you created the Users…

Here is a screenshot of the code used to create both the User in Users directory(to have a way of reaching which ones are registered), and in currentUsers when the user logs in… “firebase” is the firebase reference, .child says “go into a folder with this path”, if it doesn’t exist, firebase creates it automatically :) I use the constant string here and the uid for the selected user, so when the user logs in I can search the uid.

The messages however are sent with both .child(to access the messages directory on firebase) and with .push(because you can just attach a listener and show up messages whenever onChildAdded is called :)

Show your support

Clapping shows how much you appreciated Filip Babic’s story.