Sub CreateNotification2(Body As String) As Notification
Dim n As NB6
n.Initialize("default", Application.LabelName, "DEFAULT").AutoCancel(True).SmallIcon(iconx)
n.Build("Playing", Body, "tag1",--->ACTIVITY<---).Notify(4) 'It will be Main (or any other activity) instead of Me if called from a service.
End Sub
what should be there ? I did try main and i got and error
Dim n As NB6
n.Initialize("default", Application.LabelName, "HIGH").SmallIcon(smiley)
n.OnlyAlertOnce(True)
Dim cs As CSBuilder
n.BigTextStyle("APP NAME", cs.Initialize.BackgroundColor(Colors.Red).PopAll,Message.GetData.Get("msg"))
Dim notification As Notification = n.Build("APP NAME", "...", "Waiting", Main)
notification.Notify(2)
A simple, B4A + B4i, example based on: B4A: https://www.b4x.com/android/forum/threads/firebasenotifications-push-messages-firebase-cloud-messaging-fcm.67716/ B4i: https://www.b4x.com/android/forum/threads/firebasenotifications-push-messages-server-not-required.68645/#content It receives push...
this function spects a notification type value to be return
in the function I am using NB6 , that is not a notification type, so what do I have to return?
B4X:
Sub CreateNotification2(Body As String) As Notification
Dim n As NB6
Dim Act As Activity = B4XPages.GetNativeParent(Me) ' because we are using B4XPages
n.Initialize("default", Application.LabelName, "DEFAULT").AutoCancel(True).SmallIcon(iconx)
n.Build("Playing", Body, "tag1",Act).Notify(4) 'It will be Main (or any other activity) instead of Me if called from a service.
return ??????
End Sub