Android Question Cancel a running StartServiceAt()

Alessandro71

Well-Known Member
Licensed User
Longtime User
I'm scheduling a short lived service to run every 4 hours
If I exit the app, even with ExitApplication, at the next scheduled period, the service starts anyway.
Is there a way to cancel a StartServiceAt() that was already issued without scheduling another one?
I think I can set the next start time at about 100 years in the future, but it doesn't seem to be an elegant solution.
 
Just run the below line before exiting your app:
B4X: Copy
CancelScheduledService(servicenametocancel)
 
Last edited:
Upvote 0

Similar Threads

Back
Top