Firebase Messaging: A simple way to post real-time shared messages using Firebase

Firebase Messaging: A simple way to post real-time shared messages using Firebase.

I wanted to create a real-time message board where people could post messages to each other and the app would update with the most recent message that was posted. I wanted the most recent message to be viewable whenever you open the app. I did this using the FirebaseDB component. With this component, you can store data in Google’s cloud and access it from any device. As soon as a message is submitted in this app, the message is stored in the cloud using Firebase. Since Google’s Firebase database always has the most recent message stored, you can always view the most recent message when you open the app, whether it was submitted when you had the app open or closed.

I used the

when Firebase.DataChanged

block to notify the app anytime a new message was submitted from any user of the app.

Here you can find myFirebase_Messaging.aia (1.9 KB) and my Firebase_Messaging.apk (2.8 MB).

15 Likes

Thanks for sharing :slight_smile:

3 Likes

very goog example how to use the firebase component! :slight_smile:
do you wanna make an exclusive snippet for my snippet page?
if yes write me a private mail :blush:

2 Likes

please does firebase auto fill in the token text box when you input your firebase url. this is because after adding my firebase url i got auto fill of the token section.is it the right way/ new

1 Like

This don’t seem to be able to replicate that. Moreover, it should NOT happen because your token is a secret, and if someone can derive the token just by having your URL(which is public), then that’s a major security breach.
I would like to see if this is a bug or a mere coincidence.
When you changed the URL, did the token change to the correct one or was it a string of random letters?
Helios

1 Like

after inputing the url i got a lenghty string

Did it match with the actual token of your project or was it this:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NzMxNTQyODEyLCJ2IjowLCJkIjp7InVpZCI6IjUyMDZiZGJkLTQ3ZjctNGFmNC1hYjY3LTdhMGFiYzY3NDVhNiIsInByb2plY3QiOiIiLCJkZXZlbG9wZXIiOiJ2aXNod2FzYWRpZ2FAZ21haWw6Y29tIn0sImlhdCI6MTQ4OTU0NjAxMn0.JsPI2_Zp2y1XprS61fLHtgBHp0xAMDzzYLqFVpfsjZM

Just came along this thread. It’s a very handy event to use. Is there a best practice how to setup an own firebaseDB and what is actually the difference to the Default one?

guys can anyone help me?
i am trying to build a app for chatting…
so how to take the messages stored in firebase to the screen

Check out my “Thunkable Instant Messenger” app which uses Firebase:

https://domhnallohanlon.gitbooks.io/the-evolution-of-chat/content/aolim.html

Also, you can test out @arun’s sample app at the top of this thread:

1 Like

Please, how to make a multiple line in this app. To show more than one message. Help please.

1 Like

How can we show multiple Conversations like whats-app and many texting apps? Any clue or idea?

If you’re an experienced developer, or looking to learn some new programming skills then @Barreeeiroo’s open source app “Chatable” has all of these features:

5 Likes

It has permission problems, how can I use my own firebase and avoid error. :no_mouth: