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

after i export apk it also says

yeah but i don't want the app to show unremovable notification. that's why i select create task.

or is there have a way to not show notification while running at the background??

Which version are you using?
Always use the latest version

Please elaborate what exactly you are planning to do in the background

For example the alarmmanager does not require a persistent notification App Inventor Extensions: Alarm Manager | Pura Vida Apps

Taifun

@Taifun I want my app to send a reminder notification every specified three day in a week. only notification or message. could it be possible with this extension without showing any unremoved background notifier like shown for create process function.

Yes
that's exactly the use case of the alarmmanager

Alarm Manager Extension to send a notification or autostart the app at a given time even above the lockscreen or at boot time only once or repeated by an interval

Taifun

So it is not possible with Itoo??

You could do it with itoo, but as itoo is not an alarmmanager it needs a foreground service together with a clock to do the same

See also this example, which uses itoo for an alarm together with my opinion why this is not recommended

Taifun

there is some issue with this automatic event registration...

unknown

for example if I just want to get the current datetime in the background, itoo "thinks", I have a running clock and tries to find the Clock1_Timer event handler... and as you can see from the screenshot it tries to find it quite frequently...

@Kumaraswamy as this is great feature to simplify things for the app developer, it might make sense to have a flag to deactivate automatic event registration for those who like to have more control over what's going on in the background...

Taifun

1 Like

b5d5184b-c8db-40e7-acd1-3013cafea88c
Hello, I remember in previous versions of Itoo there was a block called CreateWithTrigger that allowed attaching an action with a procedure (for example, using android.intent.action.USER_PRESENT to run a procedure when the user unlocks the device). However, in the newer updates I can’t find this block anymore. Could you please let me know if this block has been removed, and if so, is there an alternative block to listen for the android.intent.action.USER_PRESENT event?

Hi, you can try this extension of mine instead:

would we face any issues if we do have to use the UI components? sure we wont be able to see anything while the app is in the background, but if its running in foreground, the UI will be visible yk?

Hi, no, you cannot directly interact with the UI components. The Itoo service runs in parallel.

1 Like

hi,
how to let the app with itoo show notification when the mobile was locked ? i test the Itoo with firebase , now work only in unlock status , any solution ? thanks

In your device settings you probably do not alow to show notifications while thr device is locked?

For example on my Samsung device: Notifications- Lock Screen Notifications

Taifun

Taifun

thank you , i set the lock screen notification , but still can not show the notifications triggered by datachange event, how to resolve ? By the way , how to use the itoo block to work with multiple childtag in firebase when app user subscribe multiple childtag for their interesting

Taifun

I resolved the first , in my test mobile has two notifies cat one is ItooApple , another is Defaut channel need setting in default channel can resolve the problem

how would you do it in the foreground? Any screenshot of your blocks?
Taifun


Can we create this type of thing with itoo for continuous listening and answering using chatbot component in background

Taifun

Thank you , here is the blocks let the foreground work and listening the childtag's update from firebase

, but in itoo.executeinternalscript block i dont know how to build the value with a childtag list and monitoring multiple childtag's update in background

Try to put these blocks

into your main procedure show_notice and create an event handler for Firebase_Realtime_DB1_ChildChanged

Taifun


heres the logic:

  1. the app initialises
  2. connect button is pressed, and with listpicker, bluetooth device is connected to the phone which starts a process.
  3. i saw somewhere that i shouldnt start a bluetooth connection on foreground and then use it in the background, but start the connection in the bg itself if i want to use it there, so i started an event of clock1.timer that disconnects the device once, and then reconnects it while launching two other events .
    the problem is- itoo does launch the process named orionpax but i dont think itoo recognises and reacts to the registerevent blocks as i cant see the device being disconnected anyhow which is the first if statement in the clock block.
    what am i doing wrong and what can i do to mend it?
    (also, even without the alarm loop, it wasnt registering the bleconnect and blereceive blocks at all.)