Open Source • Background Tasks: Itoo 🚀

To understand what is happening it is advisable to create a test project... I did it for you below

There is a Clock1 running in the foreground and a Clock1 running in the background running independently from each other

The counter in the foreground works only if the app is in the foreground. Timer interval is 5 seconds. After closing the app it starts from 0 again.

The counter in the background starts after clicking Start button. It increments each 2 seconds being the app in the foreground or in the background. In case the app is in the foreground, the current background counter value will be displayed in a label.

randall.aia (94.1 KB)

Taifun

2 Likes