Hi Everyone,
I'm having a problem where placing the app widget on the screen causes the notification title and body to be duplicated when the user pulls down the notifications drawer.
Here's the code that places the title and body of the notification which is in the starter service.
The notification works perfectly only if the user doesn't put the widget on the screen. As soon as the user does that, the body and title are duplicated when the user pulls down the notifications drawer.
I can live with this but it would be nicer if the app shows the notification in a consistent way.
Please forgive me if this thread sounds similar to another one I posted earlier which I closed as solved.
Thanks
I'm having a problem where placing the app widget on the screen causes the notification title and body to be duplicated when the user pulls down the notifications drawer.
Here's the code that places the title and body of the notification which is in the starter service.
B4X:
Sub Service_Create
'This is the program entry point.
'This is a good place to load resources that are not specific to a single activity.
SetupDefaultSettingsDatabase
InitializeObjects
nNotify.Initialize2(nNotify.IMPORTANCE_LOW)
nNotify.Icon = "icon"
nNotify.SetInfo("My app name is here", "This is the body text...", "")
Service.AutomaticForegroundNotification = nNotify
Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS
wakeState.PartialLock
StartTheTimer
End Sub
The notification works perfectly only if the user doesn't put the widget on the screen. As soon as the user does that, the body and title are duplicated when the user pulls down the notifications drawer.
I can live with this but it would be nicer if the app shows the notification in a consistent way.
Please forgive me if this thread sounds similar to another one I posted earlier which I closed as solved.
Thanks