ExitApplication Issues

dualznz

Member
Licensed User
Longtime User
Hi all

i have a application thats having a simple issue.
this application has a service and widget
BUT
for some odd reason when i call ExitApplication, the app closes and so does the service but after a couple of hours the service restarts

the only way for me to stop the service is to force close the application in the device settings.

the service is running ServiceStartAt()
but if the service is closed this shouldnt be running??

any help to solve this would be a great help
cheers.
 

corwin42

Expert
Licensed User
Longtime User
First of all normally you should not call ExitApplication. Just let Android choose when to close apps.

If you call "StartServiceAt()" you tell the Android alarmmanager to start your service at the specified time. No matter if your process is running at this time or not.

So if you want to clear the alarm call "CancelScheduledService()" for your service.
 
Upvote 0
Top