I am using vk sdk for my android app. The app can send and receive messages to another users. In order to get the list of messages I used /method/messages.getHistory
but how to listen new messages event when another user send me a message? For example in firebase - since it is realtime db we can do it. But how get to know when new message was sent using vk sdk like in realtime? I have an idea to start Service which will check new messages every 5 sec, but I think it is bad solution since it will drain battery etc.
Asked
Active
Viewed 166 times
5

Mikhail Valuyskiy
- 1,238
- 2
- 16
- 31