How to group push messages on Android

I am trying to group my push messages on my Android device. I want it to work as whatsapp. If there are more than 1 message, keep the header (if they match), but show the number of messages in a certain "stream".

My application has something like a chat. And I want to collect all the messages for one room and show, for example. Chat Room A as the name and then the number of new messages. As soon as a new message appears in another chat, I want him to say something like "6 new messages in 2 chats."

Unfortunately, I have no idea how to achieve something similar using GCM on Android.

Any ideas?

+5
source share
1 answer

This has nothing to do with GCM.

You need to handle the notification area, for example this . Here is the official official sample .

0
source

Source: https://habr.com/ru/post/1206009/


All Articles