Open Source • Background Tasks: Itoo 🚀

Hmmm... I do not think I understand: Does this mean that this serialization failure occurs on any ui_xxxxx procedure call from the Itoo service? surely not, because that is what the ui_ magic is for, correct? :slight_smile: Or is there something about the ui_DumpItooProperties procedure itself OR the call site from within the Screen1_ErrorOccurred hander that causes this to happen?

Is this something that is likely to be changed/fixed?

Could I work around this by using a ItooPlayerService.Broadcast message from the Screen1_ErrorOccurred procedure that is picked up by the ItooPlayerService.BroadcastEvent which would then call ui_DumpItooProperties? Or would that cause a similar problem?

-Randal

Hi Randal, this is a technological limitation and cannot be fixed.
The problem is that you are trying to pass a component to a procedure starting with ui_xxx. That call is not a normal one, only the standard App Inventor data types are allowed.

Ahhh... Now I understand! It is the second argument/parameter to ui_DumpItooProperties that is the problem!

In my case then, since there is no need for the argument - there is only one itoo component - I only need to eliminate the parameter and simply "hard code" ItooPlayerService into the ui_DumpItooProperties procedure, correct?

-Randal

1 Like

Well... that was only part of the problem. I was also attempting to pass a label component, which (of course) failed for the same reason. Once I got that corrected it works just fine. Thanks for the help!

BTW, I did not find a way to remove an argument from a procedure without causing all its calls to have arguments removed throughout the app. Since there were several argments and several call sites, I just renamed the arguments and ignored them.

Any advice as to how to easily remove arguments from a procedure so as to cause minimum disruption at the call sites?

-Randal

1 Like

I asked this question on the general discussion forum:

Evidently there is not presently a better way...

I went ahead and submitted a feature request :slight_smile:

-Randal

1 Like

5 posts were merged into an existing topic: :bell: MelonNotification • Various styled notifications + Itoo


@Kumaraswamy @Taifun
I am integrating itoo extension blocks with SMS reader extension.
My project is to fetch the SMS messages from the phone and read the last received message in background when the proximity sensor is triggered (My gesture as waving over the phone).

I have cross verified that the proximity sensor is triggered perfectly in background with itoo extension.
But when I integrate the SMS reader extension with the itoo blocks, there is no response.
Kindly help me with this.
UPI.aia (115.5 KB)

Did you ask for permission to read sns?
EDIT: yes, during Screen Initialize

Use logcat for debugging

Taifun

Hi, we cannot provide you support for an external untested extension, it's best if @The_K_Studio is able to look into it.

I am not familiar with using Itoo.

We cannot help you with that extension... Maybe you could use this one from @Taifun App Inventor Extensions: Texting | Pura Vida Apps. I still make no guarantees.

As a start, just use logcat as suggested earlier to find out, what's going on

Btw there is also the sms receiver extension available, see here App Inventor Extensions: SMS Receiver | Pura Vida Apps, which could be helpful for receiving sms in the background... it is available for 15 USD...

Taifun

The default Texting component available which indicates when a message is received by using blocks such as
When message.received

Is also not working (no response) with the itoo extension.
Am i missing something during coding (blocks) or it is not supposed to work?

Help me with that

Read the documentation of the texting component about the functionality it provides in the background.

http://ai2.appinventor.mit.edu/reference/components/social.html#Texting

Obviously I would not waste any time in writing a sms receiver extension if it just worked without it.

Taifun

The Texting component's nature does not make it compatible with Itoo... Look at Taifun's advice.


This set of blocks with texting component works fine without itoo extension.
But when i want to run it in background with itoo it has no response.
According to @Taifun , if the blocks works without itoo extension, obviously it should also work with itoo, but according to @Kumaraswamy the texting component is not compatible with itoo.
If this is supposed to work, what am i missing?
Or am i limited to puravida texting extension (free) for background processes.

my app objective is to read the incomming sms, either at the instant of receiving or with a trigger to read the last sms from the phone sms history (all by free)

Yes. Let us know your findings.

As a first attempt to use the Itoo extension I wanted to send a message 'ok5' after 5 seconds followed after another 1 second by the message 'ok1'. And again in cycle ok5 and ok1. I attach the blocks that do not work. Any suggention?

I never said this
Use an extension which was made to run in the background, which is App Inventor Extensions: SMS Receiver | Pura Vida Apps
You also can try App Inventor Extensions: Texting | Pura Vida Apps to read all received messages and extract the latest one

Taifun

Instead of the CreateTask method try the CreateProcess method to create a foreground process

Taifun