Background tasks

I'm doing an app and I want to add farm. In farm you will buy things and when you close app I want app to still work and every second give cash

No background task is needed for this.

Just keep in TinyDB the time (ms) when the app did anything last.
When you open the app, check that time compared to current time, and that gives you how long the app has been closed.
Pretend the app was open when you give the cash.

can you send me the blocks?


cash_per_second.aia (2.6 KB)



initialize global cashPerSecond to


when  Clock1 .Timer do

I leave it to you to keep coins as integers.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.