Run APP like WhatsApp

I am making a notifications app, I have managed to do so with but I have the problem of when the application closes, it stops working.
Any idea how I can do something like WhatsApp does? I would appreciate an example.

What does Whatsapp do?

I Believe you are looking for a push notifications service, like FCM, ionic cloud services, and others. You want to be able to receive message notifications and the like while app is closed?

(Sujan12) I need to read a websocket even though the application is closed, is this possible?

(taljacobson) yes I need to do someting like push notifications, but I have my own back-end to send this notification. I am trying to do with socket but the problem is when the APP closes.

@mflores83 you might want to check this plugin and this forum post for FCM. or ionic push service, not sure about how to implement it with socket but there should be a tutorial somewhere on how to sent from a custom server

Whatsapp doesn’t do that. If Whatsapp is closed, you get the messages with a Push Notification. If it is opened, you also get the push but additionally it directly loads the message from the server.

(Sujan12) Then, some idea of how to implement my own notification server, that works even when the application is closed.

I do not want to use any provider of notifications because I do not see practice give access to a notification panel to the person in charge of communications.


Notification services exist for precisely this reason. Use them. Any attempt to roll your own, even if successful, would result in totally unacceptable battery drain.

I’m trying to do the same thing. Do you already have any idea how to do it?

Firebase is what you are looking for.
For chats use Real-time Database
Push notification works in the background also (Even after closing the the app completely)

By the way, you may have a wrong impression that whatsapp is active all the time. Whatsapp app is not active. Only services like push notification is active in the background.

Your words seems unclear.

Do you mean that, you want a user to send customised notifications but you don’t want to give access of notification sending panel to that user?

If thats the case then you can use PHP(which is already available). Google for more.