Android Question check status service

Vincenzo

Member
Licensed User
Longtime User
to start my program I run my service:

StartService (MyService)

the service will operate every hour for his work.
But if I close my app and re open the program runs again
"StartService (MyService)" and starts the service before time-out!
You can check if the service is active so you do not have to run.

a guy thing....

if StatusServiceOn (MyService) = false then
StartService (MyService)
end if
 

Vincenzo

Member
Licensed User
Longtime User
for my case is not good.
if the service is not running, start it now is fine, but if the service is active, you should not restart it.
 
Upvote 0
Top