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

always use the latest version from the first post of this thread
together with the modified notification style extension

Taifun

2 Likes

The problem has been identified and has been scheduled as a fix for next update.

1 Like

Thanks Taifun, I succeeded with the first example and the Notification Style extension but now I am trying with the following blocks without success.

Move the entire bluetooth functionality to background.
Also you cannot access UI components from background...

And use CreateProcess not CreateTask.

I did the change but still does not work. No bluetooth connection


I also tried this:

But does not work


Edit by Xoma:

Working blocks

There is no listpicker in the background

To find out, if sonething is working, for example is there a connection in the background, do you receive something in the background etc use the modified notification style extension

Taifun

Good afternoon I'm trying to create an application based on your engine. I need to trigger an event periodically in the background. For the test I made an example with sound. As a result, the push notification appears in a triangle with an exclamation mark, and also plays the sound once, as expected in the background. For visualization, I added viewing of the clock timer operation while the program is not in the background - everything is OK!
But the sound does not appear periodically in the background!!!
I tried everything!
And your ItooMusic application works smoothly!
Any thoughts?


I also tried to register the button click event - for some reason the Event Register block does not respond :frowning:

Hi, in the procedue "playing" you need to remove the "x"

Also it is better to set the Source of the player before you use the RegisterEvent block.


Do you mean like that?

1 Like

Oh cool! Finally everything worked!
Thank you very much!!!

1 Like

Hello everyone!
I bring to your attention a working project for periodically listening to temperature measured remotely. And most importantly, the application has been tested and works in the BACKGROUND!!!
We receive the temperature from a command sent via BLE.
In this project, the polling frequency is set to 1 minute - 60000 ms.
command sent from the application to the receiving side: "i". You can ask yours! Please also figure out where to enter the Bluetooth ID.
A text-to-speech module is also connected. In the language of default.
God's help!
BLE_WEATHER_ground.aia (261.5 KB)

2 Likes

I tried logging.
log.txt (202.7 KB)

There is an issue in the notification style extension

I looked again at your blocks from here Open Source β€’ Background Tasks: Itoo - #403 by Jimis

The argument x in your NotificationACK procedure should be renamed to nameAction

Also in the background there is no user interface and therefore also no notifier... replace the notifier in the NotificationACK procedure by a notification from the notification style extension

And wait for a new version from @Kumaraswamy as mentioned earlier

Taifun

Hello!
Improved application stability and commented out some blocks.
And, most importantly, after requesting and receiving data via BLE, we turn it off. And before receiving a new timer, turn it on again! That is, BLE does not waste energy, which corresponds to its purpose! I saw threads where someone wanted to do this!
The polling frequency in the application is set to 30 seconds. You can change it as you wish. :wave:
BLE_WEATHER_V1.2.aia (268.0 KB)

2 Likes

Itoo 4

  • Bug fixes and improvements

  • Broadcasting from App to Background service and vice-versa is now possible

    component_event

    • Any message sent from the background service will be received by this event
  • StoreProperty now uses object serialization like TinyDB β€” making it possible to store any kind of App Inventor data type

  • Breaking change β€” adds valueIfTagNotThere socket to set the default return value

    component_method

  • Fixes service conflicts, earlier when you tried to run two Itoo services, only one of them would run, this is now fixed.

  • Fixes permission requesting problem β€” now the framework ignores any permission requests made in the background

  • Fix starting an activity from background, like (Taifun Alarm's Set Alarm block), while there are still certain limits β€” extension returns default result okay code.

Download: xyz.kumaraswamy.itoo.aix (66.8 KB)

6 Likes

Itoo extension is now open-source under GPL V3 License

4 Likes

im using Itoo extension that can make background process.
but i can't figure out where i have to attach it

Hi you need to use CreateProcess and not CreateTask to create a process.
And you can ignore the result of CreateProcess

2 Likes

thank you. it solved my problem

1 Like