Hello, thank you for helping me
I return to my problem I can not use StarService and startserviceat.
My application needs to send a notification every evening at 20 hours but the data is different every day.
I created a ModuleService "MyModuleService". In Process_Global are the variables. Then a routine "A_FAIRE" that creates the notification to be sent depending on several parameters. In Sub Service_Start I code:
A_FAIRE
questions
1) When I click on BtnValide, notification is sent immediately but i want sent in the evening.
2) In ServiceCreate, what should I put
3) Where and how to code for the notification to be sent regularly the day and hour that I want.
I return to my problem I can not use StarService and startserviceat.
My application needs to send a notification every evening at 20 hours but the data is different every day.
I created a ModuleService "MyModuleService". In Process_Global are the variables. Then a routine "A_FAIRE" that creates the notification to be sent depending on several parameters. In Sub Service_Start I code:
A_FAIRE
B4X:
Dim n as Notification
n.Initialize
n.Icon = "logo"
n.SetInfo ("MyService" MyMessage, "Main")
n.Vibrate = True
n.Notify (1)
'Here I do not know what to write
StartServiceAt ("" + DateTime.Now DateTime.TimeParse (???????????), True)
'In Main module
sub BtnValide_Click
StartService (MonModuleService)
End Sub
1) When I click on BtnValide, notification is sent immediately but i want sent in the evening.
2) In ServiceCreate, what should I put
3) Where and how to code for the notification to be sent regularly the day and hour that I want.
Last edited by a moderator: