Firebase Data Storing

I am making a chatting app using Mit app inventor , But when entered a message in firebase it is storing but when another user sends the message it just updated that only one value , How to solve this issue please show the complete block to make a firebase chat app

Here is one approach: