Help to "see" an active service

bgsoft

Well-Known Member
Licensed User
Longtime User
Hello:

I created a service and it works perfectly.
I call it from the application. This application to activate the service goes through Activity.Finish.
The problem comes when I erase the memory or recent open applications (hold down the menu button), if I enter the application and check the status of the service (IsPaused (Service Name)) then always tells me there. When this happens is that Android has happened to his schedule, but do not know how to access it, I can cancel at CancelScheduledService(Name Service), but not sure it is on the schedule. I created a global variable that asset when starting the service and disable in Service_Destroy and so when I consult it, and this works perfectly, but I wonder if there is a way to access the schedule and see what's service in up.

thanks

Jesus

:sign0013: For my bad English
 

bgsoft

Well-Known Member
Licensed User
Longtime User
Hi Erel

Yes, I do both, and that the service is destroyed but when it comes time to re-enter: Service_Start, reappears service. My question is if there is any way to know when a service is on the agenda?. I can cancel the service with CancelScheduledService agenda (service name) but I can know if it is?

thanks

Jesus

:sign0013: For my bad English
 
Upvote 0

bgsoft

Well-Known Member
Licensed User
Longtime User
Thanks for your answer.
As said earlier, I've solved it by creating a variable and storing it in a file. I put this variable to true to start the service, and false in Service_Destroy. So when I go back into the application, asked if the service is running with IsPaused (service name) or has been destroyed by referring to the variable.

I think that this solution does not seem "elegant". And so I asked if there was any way to view the schedule.

Jesus
 
Upvote 0
Top