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

Hi Taufun,

Thanks for helping me think through this one.

I am thinking about your suggestion, which is a good one. Except I do not think I can design a configurable set of parameters that would be sufficient without requiring user input in real time.

The main challenge is different (even changing) user circumstance, preference, and intent. In one instance, the user might be intentionally using cell data for what he anticipates to be a very short time and does not want to forget to turn it off when he resumes watching his movie or listening to his "tunes" which he "thinks" are downloaded onto his phone... so for that situation, he would not want to "snooze" the monitor but be willing to put up with repeated reminders (a minute or two apart).

In another instance, the user may intend to use cell data for an extended period since he realizes he may not be near wifi for he would want to "snooze" the monitor for those number of hours (or hour by hour until wifi is available - which the monitor could communicate).

Another example is whether or not to include a sound in the notice - preference might vary depending on the circumstance.

I suppose, when the user wanted to make these changes in monitor "parameters", he could simply restart the app, make changes, and then close it (without stopping the b/g task)... this might work well enough. Perhaps this is what you had in mind.

In an earlier approach, I experimented with your alarmmanager facility. Frankly, I forget what problems I ran into (perhaps of my own making and ignorance), but the itoo background approach seemed more of a fit - until I started using the NotificationStyle callback events :slight_smile:

BTW, is there a proper way to communicate reliably between the user and a background task?

Thanks for your thoughts and suggestions,

Notification Style extension's callbacks just isnt able to properly work in background. I'll write a new notifications extension if possible next month.

You mean live communication or communication by constantly reading/writing? Both are possible.

Check the RegisterBroadcast, Broadcast, UnregisterBroadcast blocks for live communication or FetchProperty and StoreProperty for storing/retrieving data.

I think that would be quite nice ... and I know you'd rather work on that than prep for exams :slight_smile: but "nose to the grindstone" (pardon the English idiom)

I have employed FetchProperty and StoreProperty successfully....What I am stumbling on is the "live communication".

Yes, I must investigate this.

My concern is that, while the blocking behavior would guarantee synchronization of communication, I would expect to need a "timeout" parameter, so that user inattention could not indefinitely hang the cyclical monitor (Timer). But I need to use these to see how they work. Thanks for the suggestion.

I think I have found an example here that uses Broadcast:

I'll see what I can come up with ...

Kind regards,

1 Like

How could I replace the /!\ (exclamation point circumscribed by a triangle) notification icon in the following with one of my own choosing?


The blocks used in the app are substantially the same as those shown earlier in this thread.


Well, I'm sorry I had to remove that feature in the previous update due to some reasons. I'll re-add it back in the next version (just few weeks more until my exams end)

1 Like

No problem - I'm quite happy at the prospect that it may be possible :slight_smile:

Thanks for taking time to reply .... Hang in there!

Kind regards,

1 Like

Hello @Kumaraswamy! I am trying to reduce the amount of logging my app is creating in logcat, in order to improve the app performance.

The lines I am trying to get rid of in logcat look like this:

03-09 15:45:38.879 2128 2128 D ItooCreator: AEvent(BytesReceived=BluetoothLE1) args [0000ff01-0000-1000-8000-00805f9b34fb, 0000ff02-0000-1000-8000-00805f9b34fb, (153 19 0 32 192 224 176 200 7 219 ...)] listener = xyz.kumaraswamy.itoo.Itoo$1@294738c

03-09 15:38:27.522 2038 2038 D ItooCreator: AEvent(RssiChanged=BluetoothLE1) args [-28] listener = xyz.kumaraswamy.itoo.Itoo$1@b27b2c7

Do you have any hints/guidance on how I can achieve this? So far, I looked into the source code to see where this line is logged, but wasn't able to. I am thinking maybe it's somewhere in the itoo-x repo.

Hi it is possible to reduce the logs produced by the app, but it may not be very nice for debugging. Will surely consider adding a feature to suppress logs in the next update <3

1 Like

Is there an option to remove the option to start applications automatically and set it to manual in the settings panel since otherwise the save boot process does not work

and also if some options were added so that the device's battery controller does not close the process

I'm not sure what you are saying, I guess you are requesting a feature to autostart the application?

Thanks for responding, that function already exists, but some phones do not do it when this option is activated

The added screenshot does not help as it is not in English.

If you want the app to autostart in the background, right now the feature is not being supported by the extension.

I'm sorry if it is in Spanish, what happens is that this process works only when battery saving is not active or when the application launch is configured manually


This is actually a device specific issue and there isnt a solution to it. You can guide your users to manually turn of any optimisations:


🧩 Itoo 4.1 Sky

(Please look into the first post for detailed documentation)
  • Added support for Firebase and Cloud DB through ExecuteInternalScript block
    Look into the resources attached in first post.

  • Enhanced existing notification icon block (req. from @Randal_Andress)

  • Added ability to turn off debug mode β€” thus reducing logs produced (req. from @aeozyalcin)

  • Added Capture and Release properties block to save property state of components & reapply it in the background.

  • Added simple property block InBackground to check if the app is currently in background.

  • Internal enhancements have been made.

I've also rewritten the documentation with a lot of resources and examples attached, please look into it!

xyz.kumaraswamy.itoo.aix (79.7 KB)

:star2: I'm a high school student, this is not an easy extension to maintain. Only possible with incredible hardwork and months of research for perfection put into it.

Please consider donating: PayPal.Me

Kumaraswamy B G


Could you provide any other method to donate except PayPal?

your the best, the cloud is now connecting thankyou very much @Kumaraswamy


Thank you for the code AND documentation updates! I look forward to using and learning about them.

Kind regards,

1 Like

Thank you for the enhancements and additional documentation :slight_smile:

I have a question about communication between the user interface and a foreground service started using Itoo.CreateProcess.

I have included the blocks photo as well as a test app to illustrate the following example:

The user interface starts a foreground service which registers a Clock Timer event whose processing reads (FetchProperty) and displays (using NotificationStyle) an item of data that has been initialized using StoreProperty...

The user interface may then be restarted and the contents of a textBox may be saved (StoreProperty) by clicking a btn.

When run on a Moto e5play (ApiLevel 26), the subsequent executions of the Timer processing successfully read and display the updated data item.

Is this a legitimate way to pass data from user interface to the foreground service? Or is the only reliable means of passing data from the user interface to the foreground service to use the Broadcast feature?

Kind regards,
[Sorry :frowning: I completely forgot to upload the blocks .png and the example .aia]

itoo_sandbox.aia (880.1 KB)