Server-side checking for notifications at all times?

My Ionic project includes a messaging system.
Just like facebook messenger, whatsapp… I want a message’s receiver to automaticly get a notification when he receives a message, whether the app is on the foreground, on the background, or hasn’t even been started yet.

Would this be possible in Ionic?