Hi folks.
One simple question. I have an APP which service is running each 2 minutes with
StartServiceAt("", DateTime.Now + 120 * 1000, False) and show a toastmessage("service running")
works great, each 2 minutes show "service running" in screen. ok
I put a button to stop the service with CancelScheduledService(Test) and stop the service and later , ExitApplication. ok
that is working. kill everything.
Why if I go to desktop and select the icon of my APP, and run it again, over and over, I have a lot of services running, and of course, I will see a lot of toast with " service running"
I put the CancelScheduledService(Test) in Sub Activity_Create(FirstTime As Boolean) with the idea to kill previous services from old running APP in RAM.
I am looking to do this, perhaps the approach is not good, if the user call again from desktop, the APP , stop the previous service "Test" with the idea leave only one running.
Thanks you