i am trying to create a notifcation when service started i am using b4a version 8 and i have follow the instruction to set info at last call like following
but this crash on android 5.1 each time service started
thats how i start the service on main2 activity create
what i am doing wrong ?
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.
nNotify.Initialize
nNotify.Icon = "icon"
nNotify.Sound=False
nNotify.Vibrate=False
nNotify.Light=False
nNotify.OnGoingEvent=True
nNotify.SetInfo("back to app", "Test", Main2)
Service.StartForeground(1, nNotify)
End Sub
but this crash on android 5.1 each time service started
thats how i start the service on main2 activity create
B4X:
StartService(Service)
what i am doing wrong ?