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

you forgot to register the WebDownImage GotFile event...
Also show us your GotFile event handler

Taifun

1 Like

As far as i understand the GotFile event is irrelevant to the download process itself. It enabled us to show the user if the download was successful or not but removing it from the application will not fail the download itself (tested)..

Ok, i now understand that unlike the previous scenario,i have to register the GotFile event even if i don't actually do anything with as it is still required for the download process in the background.

help 01-14 12:12:57.582 E/ActivityThread( 7457): Service xyz.kumaraswamy.itoo.ItooService has leaked IntentReceiver xyz.kumaraswamy.itoo.ItooService$EndActionReceiver@ef3ab11 that was originally registered here. Are you missing a call to unregisterReceiver()?

how to hide process is running , i only want notification in every change in content of label (label content from api)

Your answer already is here

Taifun

A background process must display a persistent notification

Let me suggest to follow my advice here

Insteas of here please keep posting your questions on the other thread. Thank you.

Taifun


Why this simple code does not work?
I want to create app which will give me sound every 15 min. I have re-initiated all the properties also. App gives sound at variable time, sometime10 min, sometimes 15 min, sometimes does not give alert for more than hour, no repeatable error to find.
15min=900000 milliseconds

What is your Android version and Phone / Brand ?

Did you create a process? Show us all relevant blocks.
How do you store property DifferenceSounds?
Do not use a timer interval of 0

Taifun

android 9
oneplus3T

Hi Kumaraswamy, I'm about to try using this extension. Is the 'Framework' an essential extension needed before Itoo extension will work? (The Itoo Usage description doesn't mention Framework).
Thanks,
C.

Just use itoo, read the first post and follow the usage tips

Usage

  • Before you try to do something with Itoo, first get it working normally.
  • Do not use global variables, or try to access/set them.
  • Do not use user interface components such as Label, TextBox or even Notifier since there is no interface in background.
  • You cannot use Tiny DB, alternatively you are supposed to make use of the similar storage features Store/Fetch property blocks offered by this extension.
  • For the main background procedure, you need to include an argument "x".
  • You cannot use normal Event blocks in background, use RegisterEvent block to listen to component events.
  • You cannot run more than one foreground or background service.
  • A component does not get created until you touch any of its block.

Taifun

Hi All,
I can't find an example of using the itoo.CreateTask block? I'm aiming for a background service that monitors the Clipboard and temporarily stores changed clipboard values to an itoo.StoreProperty entry. In trying out my app (see example blocks), I get the following error:-

I assume I'm missing an itoo block to associate the CreateTask block with,
but can't figure out which it is...

All help gratefully received.
C.

A task runs only a very short amount of time. Create a process instead

Foreground Service: A user visible and recommended way to execute something in the background.

  • Itoo is primarily based on supporting this service.

You will have to build the project to test. It will not run in the companion app.

As already mentioned earlier, first get it running in the foreground while the app is running

Taifun

Thanks for the warning, Taifun.
What I'm after is a service that will continue running even when my app is not the current/visible (ie. background) app or when my app stops running. Would an itoo.createProcess - described as 'foreground service' in the documentation? - be able to provide such a background service?
Thanks,
C.

1 Like

Yes, go ahead and use the Create Process block. Also iToo does not work in the companion; build your APK instead.

1 Like

Hi, can anyone see a reason why my itoo.RegisterEvent block might fail to activate the process when the clipboard1.ClipboardContentChanged event is triggered?
The greyed out blocks - disabled for build - work fine when enabled, so I must be doing something wrong in the itoo blocks - just can't see what :neutral_face:

Any help gratefully received.
C

Hello @chrisRoald, your blocks are almost correct.

Please add an x argument to your procedure CB_Monitor. It is a standard iToo convention.

Thanks, that works now - almost correctly :exclamation:

Just one problem; when a new value arrives in the clipboard, the clipboard1.ClipboardContentChanged event registered in my CB_Monitor procedure seems to be triggering twice :thinking: - the recordClipboardValue procedure certainly adds two key:value pairs to the storedProperty; so am assuming it is called twice...

Can you see anything obviously wrong.
Thanks,
C.