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

Try itoo method CreateProcess and use a clock component to send the notification after 15 seconds in the timer event handler

Taifun

I understand, friend. But I really need something using createTask. It really doesn't work? Why would someone create a function that doesn't work lol

Why? To avoid the persistent notification for the foreground service?
The 15 seconds are only to test and later you plan to use another value more in the future? In this case this would be a job for an alarmmanager
There is a basic free solution available (search the community) as well as a paid advanced alarmmanager App Inventor Extensions: Alarm Manager | Pura Vida Apps

Taifun

I just wish someone would teach me how to "CreateTask". I get angry when I can't use something, and it's been keeping me up at night lol. Could you please create a screenshot of how the "CreateTask" function could be used PLEASE.

CreateTask uses the JobScheduler API of Android, which has a maximum life span of ~15 minutes. This is used for non-critical tasks such as uploading logs or debug information to a server.

For a user-visible task, use CreateProcess, and there won't be a permanent notification on Android 15+ devices.

Then, in the procedure, use a clock component, set its interval, listen to the Clock's Timer event, and create and post a notification there.


Refer to the "Doing a GET request every 5 seconds" in the topic's guide:

In the bgTimer, replace the Web blocks with your Melon Notification blocks.

I have tried simpleItooProject.aia on Motorola Android15 phone. The service runs even if app is not active but only for 3 to 4 hours and after that it stops working. To make it work again it requires re installation or storage needs to be clear. Please guide. Thanks

Concerning Motorola read this Motorola | Don’t kill my app!

Also you can try

EDIT: also what version of itoo uses that example project? Upgrade to the latest version

Taifun

I am using the latest version of itoo. I tried the batopt.aia, which is working fine, but again it worked for around 4 hours then stopped. Only difference is that it no longer required to reinstall or clear the storage to get the push notifications again.

Please provide a screenshot of your blocks as well as the project (aia file)

Taifun

SimpleItooProject2_1.aia (164.8 KB)


Please find attached Screenshot and .aia file.

you are trying to do something (in this case send a notification) regularly every 30 minutes
this is a job for an alarmmanager
search the community for a free basic alarmmanager or use my paid alarmmanager with advanced features App Inventor Extensions: Alarm Manager | Pura Vida Apps

Taifun

Did you try the instructions in Motorola | Don’t kill my app!?

Let us know if it helps.

Earlier i built a mqtt app, which was stooping after sometime. Because of that I am sending notification message every 30 minutes with timestamp to see after how long the app stops.
Yes, unrestricted battery background usage is enabled

This should help a bit. It is a Motorola device-specific behaviour.

Keep the application open in recent menu and check if you have an option to "Lock app".

[How can we run a task at a specified time? The yellow block is not supported. I need the procedure to run at a specified time of 00:05.

Hello, here are your options:

a free solution

a paid solution

I bought this extension a long time ago, but it doesn't solve my problem. That's why it needs a background data refresh at 12:05 AM.

The following example shows the current weekday at alarm time. [PAID] ⏰ Alarm Manager Extension with Notification or Autostart - #222 by Taifun

Just call your method instead

Taifun

1 Like

2 posts were merged into an existing topic: [PAID] :alarm_clock: Alarm Manager Extension with Notification or Autostart

12 posts were split to a new topic: How to send several sms, but not all at the same time?