How to use itoo backend to update web page information in real time

Hello everyone,

I upload the data into the spreadsheet via esp32. However, I encountered some problems when using itoo in the application. I wanted to notify you that the data has been updated by 1 hour. Clock1.Timer and TextToSpeech1.AfterSpeaking did not seem to work particularly well.

Hope someone knows and can help me solve this problem.


Itoo_Clock.aia (94.6 KB)

I'm not sure, if I understand what you are trying to do... but what about displaying a notification?

Your blocks not really make sense...
The Clock_Go procedure is the Clock.Timer event handler in the background. . The clock already should be running to trigger that event, it does not make much sense to start the clock in there

Also the Clock.Timer event does not exist in the background... and it would not make much sense to set the home url of a webviewer in the background... what do you expect?

Same for the TextToSpeech After Speaking event handler... if your blocks worked, you would have created an endless loop...

Taifun

Thank you for your reply,
I just did a simple experiment, so I used Clock.
I want to obtain the data (.csv) in Google Sheet through the web, and then notify esp32 of the uploaded temperature and humidity through Clock every 5 to 10 seconds, so I can simply refresh the URL through the URL.
Itoo_Clock_v1.aia (97.7 KB)


Let me suggest you to first get your app running in the foreground

Also read again more about background processing, see especially the first post here Open Source • Background Tasks: Itoo 🚀

There is no user interface in the background... it looks like you display the downloaded data in labels... this will not work in the background...

Then be clear about what exactly should happen in the background...

For example every hour download weather data automatically in the background and send a notification to the user

To send notifications in the background use itoo together with 🔔 MelonNotification • Various styled notifications + Itoo

To trigger some functionality regularly from the background (for example every hour) you could use the alarmmanager extension together with itoo... App Inventor Extensions: Alarm Manager | Pura Vida Apps
The advantage is, you then do not have to display a persistent notification for background processing ..

Taifun