Firebase to tiny database

please brothers i have a big problem i am working on a tchat App sending messages text and picture,voices note,my problem is
i want to store recent messages in tiny database base i want that,when a users receive messages he can just select the name of that user on list view a images to open chat view and read the new messages. i want to get that message from list by using
when database change
get value and store that value in a list with
join receivemessage