Life cycle of an application with services

CapReed

Member
Licensed User
Longtime User
Hello!

I have a problem with the application I'm developing. The Main turns on two services, a widget and a process that checks the emails from my POP3 server. Everything works fine at first, but when the main application goes to background, the services still work but after a few minutes the application is closed by the system and services stop working.

However, if I keep constantly on display application, not closed, and services continue to work correctly for hours and hours and hours ...

Do I have something in mind that although the application is in the background did not kill the system?

Thank you.
 

CapReed

Member
Licensed User
Longtime User
Thanks for answering.

No crash, just die quietly. I put in the services if they are killed by the system to get back up and running again. That works fine, but when I step into the background application that starts the service, within minutes the application dies. But if left foreground everything works well for constantly.
 
Upvote 0

CapReed

Member
Licensed User
Longtime User
Ok, I'm gonna try your solution.

Is it possible that my problem may be caused because I am using to boot up services StartService rather than StartServiceAt?

Thank you very much for you help, and excuse me bad english ...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…