G GuyBooth Active Member Licensed User Longtime User Jul 13, 2025 #1 With the "old" notifications, I would use these statements when starting a service: B4X: Copy Dim nNotify as Notification .. code to construct nNotify Private NID as Int = 1 Sub Service_Start (StartingIntent as Intent) Service.StartForeground(NID, nNotify) ... End sub How do I use the NB6 notification object instead of the old Notification object? If I construct an NB6 notification object I get a "Types do not match" message ... I can't find a reference in the notes on using the NB6 library.
With the "old" notifications, I would use these statements when starting a service: B4X: Copy Dim nNotify as Notification .. code to construct nNotify Private NID as Int = 1 Sub Service_Start (StartingIntent as Intent) Service.StartForeground(NID, nNotify) ... End sub How do I use the NB6 notification object instead of the old Notification object? If I construct an NB6 notification object I get a "Types do not match" message ... I can't find a reference in the notes on using the NB6 library.
Erel B4X founder Staff member Licensed User Longtime User Jul 14, 2025 #2 NB6 tutorial: https://www.b4x.com/android/forum/threads/nb6-notifications-builder.91819/#content With a few exceptions, you can no longer call Service.StartForeground when your app is in the background. Upvote 0
NB6 tutorial: https://www.b4x.com/android/forum/threads/nb6-notifications-builder.91819/#content With a few exceptions, you can no longer call Service.StartForeground when your app is in the background.