I
I
Ivan Vorobei2017-03-27 12:37:18
Mobile development
Ivan Vorobei, 2017-03-27 12:37:18

How to implement a messenger using Push and WebSockets?

There is a goal - to implement a messenger.
Each time a dialog is opened, a websocket connection is created. We receive when the user writes a message, when it was delivered and viewed. This is all when the dialog is open.
When we exit the dialog, the websocket connection is closed. Let's move on to push notifications. And here is the nuance - if the user has banned notifications - is it possible to receive them as system ones?
A request to receive notifications usually means receiving notifications when the application is closed. In my case, I need to receive and process them when the application is open.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-03-27
@ivanvorobei

On iOS, it cannot be accepted if the user has forbidden it, and in general, notifications do not guarantee delivery. Do a longpoll and get everything through it. Or if you have your own protocol on sockets, keep the connection open all the time and receive and send all messages through it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question