Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim bPausedByPhone As Boolean
Dim MPP As MediaPlayer
Dim lstTracks As List
Dim PE As PhoneEvents
Dim PhoneNumber As PhoneId
Dim nNotify As Notification
End Sub
Sub Service_Create
MPP.Initialize2("MPP")
lstTracks.Initialize
PE.InitializeWithPhoneState("PE", PhoneNumber)
nNotify.Initialize
nNotify.Icon = "icon.png"
nNotify.SetInfo("Music Player", "Tap to open player.", TMM_Run)
nNotify.Sound=False
nNotify.Vibrate=False
nNotify.Light=False
nNotify.OnGoingEvent=True
Service.StartForeground(1,nNotify)
End Sub
Sub Service_Start (StartingIntent As Intent)
' Start the Player
End Sub