Open Source • Background Tasks: Itoo 🚀

I feel like I am a step away from solving such issue and get my app finally working, but the things are getting more and more complicated... :exploding_head: :sweat:
Do you deem feasible to somehow exploit ActivityStarter component to do that?
By the way, just right now I was unsuccessfully trying something like that (I get permission denied and the activity is not found):

Time to go to bed...
Thank you, Taifun.

No
You will have to

Taifun

ITOO extension doesnt works


I need that my APP work uninterruptedly and them I download the ITOO extension. I read the information and I made a very simple example , see the picture, but it doesn't work, somebody could help me?
thanks

You only can register existing events like Clock1.Timer... checkPacients does not exist

And if you want to post something, it might be a good idea to register the Web1 GotText event to find out the response content of what you posted

First get it running in the foreground, then try to get it running in the background

Taifun

Thank Taifun, I fix it but still not working, I show you the complete test I'm try to work (with comnnets)



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