Open Source • Background Tasks: Itoo 🚀

The Web GotText event does not fire in the background
You have to register it as you have done it for the Clock.Timer event
Then use an event handler, which looks like a procedure with the same 4 arguments as the GotText event to receive something in the background
And as already said

Taifun

1 Like

:cry: Help please, very please help, I may not understand something, I do everything as written in many posts, I use Itoo to create a background task, in my understanding, it is when the application is not open at all, but it works, for example, as I need, it should interact with esp32 via BLE protocol, without background process it works very well for me, reconnect is set up, communicates with Firebase, everything is fine, but I can not configure a background task

Even repeated exactly as in these posts

https://community.appinventor.mit.edu/t/open-source-background-tasks-itoo/55125/354?u=dolpgames_official

Show your relevant blocks

Are you using the very latest versions of itoo (Sky 4.3.1) & NotificationStyle (1.8) ?

For test you make another app only with BLE, esp32 and Itoo with minimum for connect and send "hello" to esp32

Using itoo.aix extension i want to convert my working mit app which sends sms with location to background task


here is my code.

@DolpGames_Official
You are missing the x Itoo argument for IO_Ble, please read the first topic entirely.


@Chandrakant_Sanap your code is not at all redable.


I put in an X argument, do I have to access it somehow? I'm really confused. I think I did it like in the post, but when I exit the application, it still disconnects the bluetooth connection

No
Read again the first post in this thread

Also what are these events IOBLE and OnOff_ble? These do not exist...
And you should ask for necessary permissions at the very beginning before trying to connect

Taifun

It is not possible to send sms in the background
To do this, your app needs to be in the foreground

Alternatively use an API to send sms in the background, for example Twilio... SMS API | Twilio

Also to be able to receive location changes in the background, you need background location permission... the locationservice extension is able to do this...

Taifun

I'm giving up, I'm so confused I don't understand anything. I've read the whole tutorial, and I think I'm doing everything right, but as practice shows, nothing works. Isn't “eventName” just names to be displayed ?

Components do have events, for example the clock component does have the Clock1.Timer event... so for example if you want to use that event in the background, you register that event and create an event handler for it, which looks like a procedure...

So

Taifun

Kumaraswamy, Taifun tks for your work !

I added Bluetooth Low Energy to the example of Battery Checker with ESP32 Arduino

Not is finished but working very good.

Tks Fabian R.C.

batterychecker_5_BLE_V9_15.aia (357.7 KB)

2 Likes

thank you @Kumaraswamy we will wait for upcoming releases.

1 Like

Braslets_copy2.aia (2.5 MB)

Help please, correct the errors, I just don't understand anymore. Thanks in advance :blush:

You do something with BLE... I can't help you with that, I do mot have your devices

If you want to work with itoo, you should already have some experience... get your app working in the foreground first...

then try simple tasks in the background, follow the guidelines in the first post... and follow the advice you already received

Taifun

Aaah, so Register eventName should be taken from block addresses, not made up by myself =) I'm starting to get it. Thanks

ok. i will send the code in parts

That's not what I mean, I do not have all the time to go through your blocks. If you require help, you need to make it very easy for me to help you. Like reducing the number of blocks. Also make sure you have completely read the first post.