This is very new for everyone to use Firebase with Chat View.
So I also searched so many times and find some ways to use.But everytime there was a bug in the method.
So I mixed up my ideas in @Choofa method and built a new method.
Here you can read his post:-
How it looks from designer
Components and Layouts
- Vertical Arrangement
- Horizontal Arrangement
- Chat view
- Text Box
- Image Picker
- Tiny DB
- Firebase DB
Blocks are divided into five parts.
1.Screen initialization and getting sent messages tags
2.Receive sent messages and add them in Chat View
3.Send a message
4.Check for new message(s)
Most of the blocks are self-explanatory.But still if you are unable to understand it then here is summery:
- We have set three project buckets.Two are for sender and one is for receiver.
- When sender sends a message it gets saved in sender’s bucket with a extra value true which tells that ChatView has to add it as sender message.At the same time it gets saved in receiver’s bucket without any extra value.
- Since Firebase can detect data changes so if any message is added to database then we delete all chat_tag and get tag list.
- After getting tag list, it checks if tag list is empty and if it is not empty then we call GetValue method to get all the messages.
I have used following extensions to add more features:
As there was some problem in ais file so I am now giving aia file with ais included.
But there is a faulty screen in Aia so be careful.
Here is Aia file download link:
Download Link: Chat.aia – Google Drive
Liked My Work
If you think it is useful or you liked it then you can motivate me to make Guides/Tutorials like this by downloading aia from shortened download link:
Download Link2: Chat.aia