Open Source • Background Tasks: Itoo 🚀

Got it.
Thanks.

Ugo.

A list of possible solutions for handling vibration problems related to screen state and foreground services:

  1. The first option is to go into the phone’s settings and increase the screen timeout or disable it entirely. But this isn’t ideal, because I’d have to constantly switch the setting back and forth every time I use the app — which is too much hassle.

  2. The second option is to import the Tools extension, and monitor the app’s state changes:
    If state = stop
    then call Itoo.StopProcess
    This successfully stops the process when the app is closed by swiping, because the state changes to stop. Unfortunately, the state also switches to stop when the screen turns off — so this method doesn't work for my intended use.

  3. Placing the StopProcess method behind a button click, would obviously work (though I haven’t tested it). The downside is that I’d have to remember to tap the button before closing the app, and I usually just swipe apps away instead.

  4. The fourth option is to import the Tools extension and use
    Call TaifunTools1.KeepScreenOn
    This works well for me. The only downside is that the screen stays on and the touch interface remains active, which might lead to accidental taps — but that’s acceptable in my case.

Thanks to @Taifun for quick reply and hint from the Tools extension.

1 Like

thanks so much, its working well with one bgtimer

one more thing please
How can i eliminate notifications for some users?
for example showing it to drivers not customers
image

Question for you How to detect, if your user is a driver or a customer?
Taifun

Dear @Kumaraswamy, many thanks for your advise !
I updated it (and, luckily, my app still works :rofl: :rofl: :rofl:).

Cheers.

EDIT: WOW ...but.... now the popup does not appear any longer ??? :face_with_hand_over_mouth: :face_with_hand_over_mouth: :face_with_hand_over_mouth:.
Your last version was already implementing such feature ?

1 Like

there is a position box being added in the account and can indicate it by fire base or tinyDB,
one is driver and one is customer

@Taifun I tried to use that block to eliminate it but didn't work
image

  1. Your screenshot is of bad quality
  2. I can't read your language
  3. Protip: add a Notifier ShowAlert block as test to indicate, if it is a driver or customer

Taifun

here is another screenshot
image

here is my updated answer

Taifun

i just wanna know how to eliminate the notifications through the initialize or through bg timer

Your blocks look fine, however

To find out if your if statement is working

Taifun

2 posts were split to a new topic: Is there a better way to format for list view?


i followed one of the weather app example on this thread, but heres the problem, when i press the button on my blemodule to send a single byte value 1, it doesnt register at all, like not even when the app is open. it works fine if i directly use bytesreceived block directly, but not when i registerevent for it.update: im not sure if even the createprocess is working properly. help

Please provide a link

Let me suggest to register all events in your main procedure monitorconnection

For debugging use method Notifier.LogInfo and logcat to check what's working

For example in procedure request add a Notifier.LogInfo "successfully connected" and check logcat for that message

Taifun

i cant use my clipboard to copy link somehow, its the thread number 397


this one by jerej.

yes i did that and changed the bleconnected one



i realised i needed to use the apk version of the app and not the ai companion connect one, so i found that the createprocess is working kinda okay {as the connectwithaddress block was working fine}till a certain point. the registerevents under monitorconnection are definitely NOT working still because wehn the device is connected, the bleconnect procedure that should work, doesnt? and bytes are still not being received, dont think the clock1.timer is working either. for debugging, i did try the logcat thingy, but in the powershell, the data kept on coming without a single millisecond of delay, and that confused me even more, so i dont know anymore, help
UPDATES: the doit procedure, the bleconnected AND blereceived are working now.

blocks (27)
blocks (26)
i saw the last example in the mainthread of firing an alarm whenever device is shaking and realised i had to do these too.
thank you for your help so far taifun

rather another question related to this, does the function of calling someone from the background like this not work?
Screenshot 2025-07-04 234820
and if not, then what are the alternatives of doing so? the phonecall blocks dont work, and when i try to run via activity starter, the whole app restarts completely. help
@Taifun

No
To call someone the app must be in the foreground
My alarmmanager extension among other things is able to bring the app to the foreground

Taifun

Okay thank you very much. But doesn't the createprocess of itoo bring everything to foreground too? Is it itoos limitations to do things or?

From the terminology section of the first post in rhis thread

  • We say the app is in "foreground" – meaning the app is open, being active.
  • The second meaning, we refer to "foreground" as in "foreground service" feature offered by the extension.

A foreground process does not bring the app to the foreground

Taifun

1 Like