Open ferranki opened 6 years ago
Hi @ferranki,
2,3. A notification with the same id always replaces previous one with the same id by design.
To tell the truth, this feature is not the most useful one, and was even removed from the latest Android documentation, so you can consider it to be out of date and not recommended for use. It was mostly designed for wearable devices, such as smart watches on Android, which allow you expanding a group summary notification to review a list of other notifications it replaces (which is important to save little screen space).
Best regards, Yuriy, Universal Tools team.
Thanks for the explanation. I have tried what you said and I still do not respect the groupings. I leave the format that I used for this case.
{ "data": { "title": "${data.title}", "text": "${data.text}", "notification_profile": "${data.notification_profile}", "notification_group": "${data.notification_group}", "notification_group_summary": "${data.notification_group_summary}", "id": "${data.id}", "data": "${data.data}", "extCode": "${data.extCode}" } }
The log in gamesparks:
{ "@class": ".ScriptMessage", "data": { "title": "Nuevo mensaje de chat", "id": "10", "notification_group": "group_key_mails", "notification_group_summary": true, "text": "ferran te ha enviado un mensaje de chat", "notification_profile": "custom", "sound": "custom", "extCode": "SendChatMessageNotification", "data": "test" } }
This is the correct format? I send two notifications with the same id but in diferents notification_group.
Thanks
I send two notifications with the same id but in diferents notification_group.
Any notifications are replaced with newer notifications with the same id, regardless of the group. It's by design. If you want them to stay separate, use different ids. Please also note, that every group should have only "notification_group_summary" notification.
I'm having problems grouping and separating notifications, I have several questions:
1-If I do not group the notifications, it groups them together and only leaves one. (Grouping mode = None) on Android. Is this behavior correct? This should not be the (Grouping mode = ALL_IN_SINGLE_GROUP)?
2-If I have the (Grouping mode = None) in Android and send them with different id separates them by id but only leaves the last of each id.
3-If I put the id, it does not matter the (mode) that you have selected that groups them by id.
4-To group by (from user data) how would it be? I do not quite understand the requirement that is requested. The template I was using is: { "data": { "title": "$ {data.title}", "text": "$ {data.text}", "notification_profile": "$ {data.notification_profile}", "notification_group_summary": "$ {data.notification_group_summary}", "id": "$ {data.id}", "data": "$ {data.data}", "extCode": "$ {data.extCode}" } }
I have also tried, directly putting my own id and I have not gotten it either: { "data": { "title": "$ {data.title}", "text": "$ {data.text}", "notification_profile": "$ {data.notification_profile}", "notification_group": "hshdn-4", "id": "$ {data.id}", "data": "$ {data.data}", "extCode": "$ {data.extCode}" } }
In the setting of pluging settings should I put something else?
These things would be easier to understand if the documentation would be detailed. I do not think it will cost so much after having made the xd plugin
Thank you for your attention.