How do I count from 0 to 100 when the app is closed?

Could anyone send me a simple background app that counts from 1 to 100 when the app is closed

You do not need something running in the background for that. .

Let's assume, you like to increment the counter every second... do it like this: press the start button and store the start time in TinyDB and increment the counter in a Clock.Timer event
Additionally in the Screen Initialize event read the start time from TinyDB and calculate the elapsed number of seconds by calculating current time - start time and set that as counter

Taifun

Thank you very much, is there any example you could hand me, im not used to TinyDB

In this case you should first learn the basics...

A very good way to learn App Inventor or Kodular is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Tutorials for MIT App Inventor to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun

1 Like