I have this chat room blocks which is working fine However I would like the messages deleted on exit as when I open the app again the old messages are still there Can anyone help Thanks
Deleting from FirebaseDB is a matter of clearing the chat Tag. You have only a single Tag so this
will clear your conversation. See FirebaseDB
To ‘delete’ and close your app (only works using an apk) try
Using a Button, means immediate deletion. You might want to do this using a more complex method using a Notification where you provide an opportunity to change your mind. See Notifier .
Regards,
Steve
Also you may need to think about “others” in the chat - say there are three of you and you leave the chat but the other two want to continue, they won’t take kindly to you deleting everything when you leave…
Hi Thank you I didnt realise that Regards
Hi Steve many thanks for the help I didn’t realise I had to clear firebase Now I think I will leave it as it is as I don’t want my other mates having their convo deleted when I leave Not a way of keeping friends lol Thank you
Here is a chat app that automatically deletes the oldest parts of the chat stream after 10 postings. How to: A Family Chat app built with the MIT CloudDB component You might be able to adapt it to your purposes David. To make it work with Firebase, the developer needs to replace the FB components with CloudDB component ‘equivalents’. If I remember correctly, there are about four instances you would change.
– Steve
Wow thanks steve That looks very interesting for me and my friends As always much appreciated for your time Regards