main activity:
service named mp3service:
how to remove the Notification from status bar when StopService(mp3service) ?
Any help will be appreciate it.
B4X:
Sub Process_Globals
End Sub
Sub Globals
Dim StartButton As Button
Dim StopButton As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
If IsPaused(mp3service)=True Then
StartButton.Enabled = True
StopButton.Enabled = False
Else
StartButton.Enabled = False
StopButton.Enabled = True
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause(UserClosed As Boolean)
StopService(mp3service)
End Sub
Sub StartButton_Click
StartButton.Enabled = False
StopButton.Enabled = True
StartService(mp3service)
End Sub
Sub StopButton_Click
StartButton.Enabled = True
StopButton.Enabled = False
StopService(mp3service)
End Sub
service named mp3service:
B4X:
Sub Process_Globals
Dim notification1 As Notification
End Sub
Sub Service_Create
End Sub
Sub Service_Start (StartingIntent As Intent)
Dim n As Notification
n.Initialize
n.OnGoingEvent = True
n.Sound = False
n.Vibrate = False
n.Icon = "icon"
n.SetInfo("Volume", "", Main)
n.Notify(1)
End Sub
Sub Service_Destroy
End Sub
how to remove the Notification from status bar when StopService(mp3service) ?
Any help will be appreciate it.