Open Source • Background Tasks: Itoo 🚀

you can very well debug your code, just use the Notifier.LogInfo method to log something and use logcat to check

unknown

add a ClockPermissions.Enabled to true to start the clock
also you forgot the argument x for the procedure

move those two blocks into your controle procedure


and use only Post OR Get and not both at the same time

unknown3

the NotificationStyle extension is outdated, use the MelonNotification instead

Taifun

1 Like

which start mode are you using for the alarmmanager extensoin?

if you use "Only Notification" you only need Post Notification permission, see again the documentation App Inventor Extensions: Alarm Manager | Pura Vida Apps

if you want to schedule exact alarms, then ask additionally for Schedule Exact Alarm permission

unknown

Taifun

Thank you once more Taifun,

I really don't know why I must put an argument x and if it is really needed what I define as argument X ("...also you forgot the argument x for the procedure..."), for instance : I have to put "response content" due I´m asking a url conexion??

About my start mode, I need an exactly alarm schedule, as you see I already asking for this permission

Because without that it will not work
Read post 1 how to use itoo

???

Taifun

I did not tell you to add an argument responseContent, I said

Your getphp procedure is the event handler for the Timer event. Both the event and event handler do not have any argument, fetchMessage is the event handler for the GotText event. Both have 4 arguments.

What about

As you are trying to call the alarmmanager extension from the background, you first have to set the start mode in your main background procedure console

Also it would make sense to register the Alarmmanager1.Started event to find out, if the alarm time could have been set correctly or if an error ocurred.

Again: use logcat for debugging

Taifun

1 Like

can someone help why is this not working

i have tested the whole web1 code seperately and ik that it can store the value, there r no battery ristrictions currently active on my Nothing Phone 1(that i know of).

Pls help

Hello @THUNDER_THUMBS

Please post an higher resolution of your screenshots the next time. It's hard to read and makes it difficult for us to help you.

I see a few mistakes in your blocks.

  1. Do not use TinyDB in background due to sync issues, instead use Itoo's own StoreProperty and Fetch property blocks. (Read Principles of Design and Usage) in the first post.

  2. Secondly, global variables do not work in the background. They are not defined when you access them from background. So the URL variable must not be accessed from the background.

thank you soo much, i will make sure to send the photos properly next time

1 Like


i have refined ze code, imma try and tll ya later

You are still using TinyDB in the background
Also why do you use TinyDB and Store/FetchProperty methods for the same tags? Just use only Store/FetchPropetty methods to simplify your blocks

Taifun

1 Like

because i am accessing the data from tiny db in other screens too

i saw that error i left in some tinyDB blocks lol, thanks

Any suggestions to make itoo working in the background with sound!

here is my blocks so what is missing to make itoo working in the background with sound when a sheet cell num exceeds 7 in the listview elements!
thanks in advance!

User interface components like labels do not exist in the background

Taifun

He tried even without that label but the sound didnot appear. So do not what is the reason. Or do not knkw where do makes mistake

Then he should do it step by step... start simple, and if it works, add more blocks

The first thing could be to use the complete response content together with TextToSpeech

Taifun

Is it possible to use variables in background tasks?

Read the first post in this thread
Taifun

#1 ?