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

My friend, I am trying to donate to you using Paypal but I am getting an error. Could you send your email directly in my dm?

1 Like

MANY THANKS!!!! This really motivates me to continue the project!
I'll send you the link in DM.

7 posts were split to a new topic: TextToSpeech issues

To clarify, in your example "Notification Every Second", could the "evaluate and discard result" be replaced by some other reference to the Clock component such as:

Second question: Is such a preparatory call required only before an "itoo.RegisterEvent" which makes reference to the component? Or are there other itoo calls that require a preparatory component reference/call?

Thanks,
Randal

@Kumaraswamy , Hi, I am planning to create an app that gives continous alarm sound until the user stops it. This alarm sound will be heard as a Notification to the new email that says 'New order Recieved from a Customer'.

1 Like

You cannot use UI Components in the background.


You only need preparatory for before Itoo.RegisterEvent. If you have used any other block from that component, preparatory call isnt required.

It's because the component is only created when it's touched or accessed.


Nice idea

Opps! bad example...

... but thanks for answering the question I was trying to ask :slight_smile:

...and a question that I did not ask, but I was wondering about.

Looking forward to learning about and using itoo.

Kind regards,
Randal

1 Like

Hello,

I am an App Inventor user, and I want to record incoming calls in my application. However, I need to ensure that this process continues even when the application is closed. Therefore, I am considering creating a background service.

My Challenges:

  1. I need to create a service that continues to run in the background even when the application is closed.
  2. This service should constantly monitor and record incoming calls.

Seeking a Solution:

I need assistance on how to approach this with App Inventor. So far, here are the steps I've taken:

  1. I added the Itoo extension to my project.
  2. I created a background process using the "CreateProcess" block and placed it inside the "Screen1.Initialize" block.
  3. I wrote the necessary code within the background process to monitor incoming calls.

However, it seems that the background process is not running when I close the application.

Points Where I Need Help:

  1. What is the correct approach to create a background service with App Inventor?
  2. How can I ensure that the background service continues to run even when the application is closed?
  3. How can I monitor incoming calls within the background service?

Additional Information:

You can also use the images I provided to overcome this issue.

Thank you.

you forgot to create the PhoneCall component in the background before registering the event

also your procedure is save_call_logs and not save_call_logs_to_local

and f you want to store something in the background, let me suggest you to use the FetchProperty/StoreProperty blocks rather than a global variable/TinyDB

Taifun

1 Like

Hi @bay_max, thanks for the details, here are my suggestions:

  1. First get incoming call recording properly working normally without a background service.

  2. You have actually missed out on a few core concepts which the extension works on.
    You are not the only one and I dont fault you for this, I believe documentation isnt so beginner friendly (I'll have to work on a more comprehensive documentation when I get time).

    So one of the things you can do right now is, go through the earlier posts in the topic or perhaps try some simple examples with Itoo, maybe you can try creating a background process that will play a music every 10 secs? You could also try guides related to extension β€” like the Battery Checker by @Taifun

1 Like

Hello @Kumaraswamy ,

You have provided the AIA file codes for the application under the title "Battery checker reminding you to unplug when fully charged."

After I installed it on my phone, I realized that the application doesn't work when I close all the applications like in the pictures.

Isn't there a detailed training series about the Itoo extension? I'm new and can't understand it very well.

Thank you for your attention.

I would need more details, can you tell me about your Android version, device name and model? You actually have to click the Start Process button (which I assume you did)


Unfortunately there isnt any detailed training series on the extension. I can understand your problem, It's really hard for beginners to understand how the extension works...

Only thing you can do is look at what other's have done in the pasts by exploring previous posts.

You can also check at extension references below the first post:

You'll get some examples and guides demonstrating the use with Itoo extension there.

1 Like

@Kumaraswamy
I pressed the start button in the battery charging application, of course. :slight_smile:
It was working while the application was open. However, it didn't work when I closed all the applications.

And I'm sharing a screenshot of the information related to the phone. I will also examine the sample applications you sent.

1 Like

Aha, it's Xiaomi :wink:
You may need to turn off some by default enabled battery optimizations on your device: Xiaomi | Don’t kill my app!

Check for device's battery optimization and app specific optimizations.


Do you see the notification still exist when you close the app?

no, when I close all apps, the notifications on the screen are turned off.

Can you please send me a short screen recording of that happening? You can message me privately by clicking on my profile.

Hi, @Kumaraswamy , I created an app that plays sound when new order is received as notification in our phone.

blocks (12)

Now it is time to include Itoo extension as well. Can you give some tips?

My Plan: To create an app that gives continuous alarm sound whenever new-order-notification-email is received in phone. I am using ecwid.com to sell products online, so whenever new order is placed by customers, Ecwid will send new email notification about the order to me.

Give me some tips to use Itoo extension more efficiently in this app. Thankyou.

Okay, since you've got that working normally in background, here's what you can do to turn it into a background mechanism.

  1. DONT start directly, first play around with the Itoo extension with some examples you may find in this topic.
  2. After you are a bit familiar with the Itoo extension (first you must know how the extension works before you actually directly use it) then you can start converting your blocks into background functions to work with Itoo.

After only you have tried something and get stuck (not knowing what to do) you can ask for help here.

1 Like

Okay.

your solution does not really work, see also my answer here Is it possible to make an app that notifies me with alarm sound when I get new mail from specicific email id? - #22 by Taifun

Taifun

1 Like