Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
....
Private NotifyString, Notifier As String
....
End Sub
Sub Service_Create
....
SetNotification("Nothing Loaded.")
Service.StartForeground(1,nNotify)
....
End Sub
' Set the notification to carry the passed in message
Sub SetNotification(Message As String)
nNotify.Initialize
nNotify.Icon = "icon"
nNotify.Sound=False
nNotify.Vibrate=False
nNotify.Light=False
nNotify.OnGoingEvent=True
nNotify.SetInfo("The Music Machine", Message, B4XPages.GetPage("B4XPTMM_RunID"))
nNotify.Notify(1)
End Sub