Firebase real time chat issues

Hey thunkers,am having issue displaying text inputs in my chat app, with the real-time adlistener in firebase…
This app uses the real-time adlistener component,and of which a key associate users to see text entered.
But unfortunately it’s not working for me.
think I might have mixed things up, please help

Why do you have a blank “if” block at the top?

Also, “it’s not working for me” is not enough details for us to help you… what do you expect to happen when you do [some action] and what actually happens?

The blank if block was meant to -do nothing if text input=undefined or null…
So the normal result should be…when a text is entered at the click of the send button,the Real-time DB should get update and display the text in either the Left or Right Output label depending on who’s texting,just like the normal chat app…
Thanks for your response

Here’s the link to the app sample for a review-

An if block without a condition is going to be unpredictable. Or perhaps it isn’t… perhaps it will always be TRUE or always be FALSE. Regardless, it’s not a good way to program. Just remove that if block.

You’ve explained what should happen but not what does happen when you preview the app.

1 Like

An if statement without a conditions breaks, it will never go to the else statement. It faults out. In actually programming it will throw a syntax error. (i think thats the right error) Try adding a condition to the if statement.

1 Like

I’ve made an adjustment to it,but yet nothing works

Have you been able to successfully send a message at all? If not i would start there before trying to do clones and such. Whenever i run into an issue, i start with the basic components needed then work my way up

1 Like

It’s nothing working either,can somebody just please help me out on this…
I want a chat room where by users can join using the key served ,and I will humbly it to be a clone not in a listviewer type.:pray::pray::pray:

So I finally clicked on your project, I don’t think you have the rtdb database or api key in there. I put mine in and was able to post a message to the chat and have it show up in my rtdb. Scroll down until you see firebase settings. Then follow the instructions here.

1 Like

thanks,i will check that out

This might not be the case at all.

When you copy a project from another account, Thunkable removes sensitive data from the project such as API keys.

1 Like

The result is same, inputs are not showing up

I think there is a problem with the Real-time DB,the rules are on "now…any idea on what should be done!

1 Like

Can you clarify?

1 Like

That’s been resolved @muneer ,but that has brought me into another phase to advance the chatting stuff…
I don’t want chat records to clear after users exit the chat screen…I want to them to be able to still see previous and current conversations in the chat room…

I was formally using a Listviewer to preview conversations (Real-time DB) and a real-time adlistener "data change

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