I want to come back to this now that I have tidied up some other bits.
What happens is, when the app starts it creates the ongoing notification, no problems there.
Also, I have a notification added when an SMS is received.
And this is where my problem starts.
When a new notification is created, it creates another icon with the notification number displayed.
So if I receive say 3 SMS messages I would have one App icon for the ongoing part, then 3 seperate icons with 1,2,3 on the icons.
When the service starts I do the following:
If oNotification.IsInitialized = False Then oNotification.Initialize
oNotification.Icon = "icon"
oNotification.AutoCancel = True
oNotification.SetInfo("My App","My App started", Main)
Service.StartForeground(1,oNotification)
This creates the ongoing event notification. All good there.
So now an SMS comes in and I then call this Sub
Sub AddNotification(sTitle As String,sMessage As String)
iNotificationID=iNotificationID+1
oNotification.SetInfo(sTitle, sMessage, Main)
oNotification.number=iNotificationId
oNotification.Notify(iNotificationID)
DoEvents
End Sub
I cant work out why it keeps adding the icons. Can you help?
Jeremy