Android Question Can I have multiple and diferent type Services working at together?

nicieri

Active Member
Licensed User
Longtime User
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.
 

nicieri

Active Member
Licensed User
Longtime User
Ok... I will do with "MyOwnStarter" Service.. that will start at boot.

So... the other part of the question?...
 
Upvote 0

nicieri

Active Member
Licensed User
Longtime User
If Android kill my app or services for battery consume... the service programmed every 30 minutes also will killed? canceled?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…