Developing a client for social networks, the question is how to make a notification about a new message that appears? I communicate with API of social networks not directly, through my server. Actually the question is, how can he notify me about the new message received? Via push? pros, cons, other options?
- through the push. very good option. You can send by email or text message. The pros and cons are obvious. There are other options (write service), but fortunately not on ayoshi. - KoVadim
- I mean the alert not only when the application is closed or minimized, but also in active mode. Well, I need to know how that message appeared. Do not interrogate me the server every 10 seconds there. (as an option, you can use sockets) I also consider push. I just want to make sure that this is the right choice for this task? - alexruden
- Push is not something that is true, but recommended. - etki
|
1 answer
Only if you use push or write a longpoll on your server. For example, vk.com has a longpoll connection and works great, faster than push. Here is a description of such a service in the vc.com API, you can write your own like this: https://vk.com/pages?oid=-1&p=Connection_to_LongPoll_server
I have experience in implementing such an approach - it works perfectly, contrary to all expectations, the battery does not eat wildly
|