Open Source β€’ Background Tasks: Itoo πŸš€

You cannot start an activity like that from the background. Activity Starter wont work.

This post was flagged by the community and is temporarily hidden.

Can you explain, what exactly you are trying to do in the background?

Taifun

in this case i just want to check the functionality of the extension. but on my redmi12 android 14, and samsung 11 android. it doesn't react at all. i need a working project to test

In the first post of this thread you can find a lot of examples, just update to the latest version of the extension

And if you like to see a notification on Android14, then ask for post notification permission, the Notification Style extension offers a method for that

Taifun

I have your extension. But I still don't understand how version 8 works. How to get data from json in the background

where is the mistake?

There are many mistakes.

  1. Do not use multiple Itoo components, you should only have 1 Itoo component present.
  2. The event name whenWeb1.GotText is wrong. It should be Web1.GotText.
  3. You cannot use TinyDB in background, you have to use Itoo's Fetch and Store property.

I also advice you to thoroughly read the first post to get better idea of how to use Itoo.

2 Likes

It seemed to work. When I reopened the app after 10 seconds, the data was received and saved.

1 Like

Great
And to optimize your logic, register your event only once and not each time the timer fires...

This question actually is off topic for the itoo thread
Using my alarmmanager extension App Inventor Extensions: Alarm Manager | Pura Vida Apps you actually do the same as you have shown in your latest screenshot... but instead of the bgTimer procedure you just use the OnReceive event handler, so each time the alarm is triggered, you can download the data from that server in the background

Taifun

1 Like

I need the curtain to receive the application data in the background. now the tamer is set for every 3 hours. Thanks to Kumaraswamy and Taifun for their patience and help.

I was in a hurry to say that I receive notifications. Notifications come when the application is open. The alarm timer does not work in the background.

Some errors.

  1. you are not using my alarmmanager extension, so it does not make sense to use these blocks

  1. you are registering these events twice

and because of this

A component does not get created until you touch any of its block

I think you need an evaluate but ignore result block together with the web component before being able to register the Web1.GotText event

  1. don't create the background process again from the background, it has been already created in the Screen.Initialize event

Also do not use global variables in the background!

  1. in the background there is no user interface available... also what is hidden in these blocks?

Again: do not use global variables in the background, use Store/Fetch property methods

  1. do you get the persistent notification displayed? Usually you first ask for permission and then after it has been granted, you create the background process... you are currently doing it at the same time

Taifun
PS read again

1 Like


Processing: blocks (4).png…

I did everything as you said. It still doesn't work. The notification appears if I open the app.

finally the app worked. but without your permissions it doesn't work. but why are there constantly repeating messages? how to get one notification instead of many

It always would help very much to explain, what exactly does not work

My blocks are not required

  1. you do not use full screen intents
  2. you ask already for post notification permission in the Screen Initialize event
  3. you do not use an alarmmanager and therefore you do not have to ask for exact alarm permission

Taifun

1 Like

shake and sms location and give a call.i have a working .aia for this.I want it to run in background.Can u please do it for me?
i am ready to pay.
here is nirbhaya.aia

nirbhaya.aia (87.1 KB)

Hi, I have messaged you privately.

I've been struggling with this extension since morning. I realized one thing, the extension is not stable for some reason. Sometimes it works great, sometimes it stops working altogether. I don't understand anything anymore

there is no difference, I tried that too