For example.. I have one service that start at boot.. "Starter"..
In this service I have
Sub Service_Start (StartingIntent As Intent)
'StartService(GPSimple)
Dim t As Long = FindNextTime(Array As Double(0, 0.5, 1, 1.5, 2, 2.5))
Log($"Next time is: $DateTime{t}"$)
StartServiceAtExact("", t, True)
StartService(MyOtherService)
End Sub
Then.... inside of "MyOtherService"... i have this service whit this lines..
Sub Service_Create
Dim n As Notification
n.Initialize
n.Icon = "icon.png"
Service.StartForeground(0,n)
....
End Sub
I know I have my service in Foreground.. but the idea is guarantee.. that my service "MyOtherService" is working right.. if Android cancel my service.. i wan to start it at the "FindNextTime"..
My other question is... if all the above is correct...
Maybe I can configure my service "MyOtherService".. with a
'StartServiceAt("", DateTime.Now + 10 * 1000, True)... if for some reason.. this don't work.. then the Service "Starter" will verify and then start at the next time.
In this service I have
Sub Service_Start (StartingIntent As Intent)
'StartService(GPSimple)
Dim t As Long = FindNextTime(Array As Double(0, 0.5, 1, 1.5, 2, 2.5))
Log($"Next time is: $DateTime{t}"$)
StartServiceAtExact("", t, True)
StartService(MyOtherService)
End Sub
Then.... inside of "MyOtherService"... i have this service whit this lines..
Sub Service_Create
Dim n As Notification
n.Initialize
n.Icon = "icon.png"
Service.StartForeground(0,n)
....
End Sub
I know I have my service in Foreground.. but the idea is guarantee.. that my service "MyOtherService" is working right.. if Android cancel my service.. i wan to start it at the "FindNextTime"..
My other question is... if all the above is correct...
Maybe I can configure my service "MyOtherService".. with a
'StartServiceAt("", DateTime.Now + 10 * 1000, True)... if for some reason.. this don't work.. then the Service "Starter" will verify and then start at the next time.