HI all,
I have a service that intercept incoming SMS and I use
to prevent the service is killed form the OS.
So the service run forever, but happens (rarely but happens) that it is killed again.
I'm thinking to use
But to be really useful I would need to specify a very short time of 10 seconds or less.
I wonder if this could have some negative effects (resources, power consumption, I don't know).
Also, what happens when the scheduled event raisebut the service is already running ? Is the code in service_start executed again ? (and how eventually to avoid it) ?
Marco
I have a service that intercept incoming SMS and I use
B4X:
Service.StartForeground
to prevent the service is killed form the OS.
So the service run forever, but happens (rarely but happens) that it is killed again.
I'm thinking to use
B4X:
StartServiceAt("", DateTime.Now + 60 * DateTime.TicksPerSecond, True)
But to be really useful I would need to specify a very short time of 10 seconds or less.
I wonder if this could have some negative effects (resources, power consumption, I don't know).
Also, what happens when the scheduled event raisebut the service is already running ? Is the code in service_start executed again ? (and how eventually to avoid it) ?
Marco