Public Sub SetGroup (groupname As String) As NB6
' If IsBuilder Then
NotificationBuilder.RunMethod("setGroup", Array(groupname))
'End If
Return Me
End Sub
Public Sub SetGroupSummary (summary As Boolean) As NB6
' If IsBuilder Then
NotificationBuilder.RunMethod("setGroupSummary", Array(summary))
' End If
Return Me
End Sub
and follow the tutorial on the android page:
B4X:
Dim n As NB6
n.Initialize("default", Application.LabelName, "DEFAULT").AutoCancel(True).SmallIcon(smiley)
n.SetGroup("b4a.example3nb6.TEST_GROUP")
n.SetGroupSummary(True)
n.Build("Title", "Content", "tag1", Me).Notify(Rnd(1,1000))
Right. I find the API confusing: NotificationCompatBuilder.setGroup() method comes from the Wearable API. Its purpose is to manage notification groups on the wearable - though it also affects the phone. But most people are looking for the Gmail-Whastapp-like groups on the phone. Answer is : you have to do it yourself using notificationIDs to update your notifications. And you have to save your data between each notifications, to be able to compute the "summary" notification - which is, again, up to you to build and to send with the same ID to replace the previous "non-summary" notification. – JohnMay 4 '16 at 16:22
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.