Ionic chat app

hey guys , i hope that u r good ,
so i’m developing an app with ionic1 & angularjs 1 this app consumes restful web service built in J2EE , now i will add a demo of a chat (real time) app to my app wich will incule basic fonctionnalities like private chat ,groupe chat , find contact who are connected so how can i do that ? this demo chat app wich i would include in my app should communicates with back-end or not ? wich back-end can i use ?
now i googling i’m reading about "Build a Real Time Hybrid App with Ionic & Firebase " can firebase help me to do that so i confirm that my app should still communicates with J2EE back-end wich i have
so thk u very much for your shariing :smiley: good luck