ItoO - Background Tasks [special] 🥳

Can you share a demo aia in my PM ?

2 Likes

Edited your aia file but unfortunatley the firebase extension doesn`t support store value yet, so I used on TagChanged event handler in demonstration, Which is working only when a tag is changed in your given bucket
backGroundPlayer.aia (70.9 KB)

3 Likes

Tried but not working

ItoO Tasks 1.1


[1] Fix crashes, and event bugs
[2] Ability to call other procedures
[3] Internal optimizations
[4] Background service from now on will be ignored if the app is active.

[5] Added Cancel Block
[6] Auto Fix for components (Firebase)


The firebase bug is fixed now :grin:
First you have to set the URL, token and others…


xyz.kumaraswamy.itoo.aix (26.1 KB)

10 Likes

Hey
after upgrading to version 1.1 my test project stopped responding, even minimized or even not being active, it doesn’t seem to run the service.
When downgrading to 1.0 it worked normally again.

Hmm, please post the aia file here.

I think he is not willing to share the aia in here, you should PM him

Follow the AIA with version 1.0
TesteSegundoPlano_copy.aia (39.2 KB)

1 Like

thanks, i will check what is going wrong, btw, blocks are different from the one you posted as image?

Yes, same project, but I changed the URL and responseContent treatment because they point to a private server.

Rest is the same one I’m using to test the extension here!

1 Like

hey, i just checked the project with v1 and v1.1 and both of them are working properly.

image

I guess i know where the problem is.


image

The latency is here set to 2 seconds, the service seems to be starting before you even close the app.

In v1.1, incase the service is started and “App” is not closed yet, the service will be strictly rejected. This was done because to prevent any false/miss/bad errors from appearing.

I set the “Latency” to 7 seconds and it was fine.
In the next update, i will try to add a feature “OnlyInBackground” which makes the task/service run when the app isnt active.

thanks for the feedback
I’ll be back to testing!

1 Like

I thought about the latency issue, but came to the conclusion, “correct me if I’m wrong”.
In this way, I need to use a trigger to start the service in the background, such as a button where the user chooses such an action and in the sequence close the APP intentionally, which most of the time will not happen.
That way it wouldn’t be practical except when dealing with an alarm!

I’m sorry for my english!

1 Like

Yes you are right, sometimes you may call the block before the app closes, if you know how.

I know its not practical, there will be a feature to fix this.

1 Like

that’s a great work :heart:

I have a suggestion, what if you add a block by which it is possible to know if the feature is still working or has been killed?

This would be useful in examples like FireBase

version 1.0 and 1.1 non of them work with me i tested on two device MI 8 lite and VIVO X70 pro

change the notifaction ID to any other integer, say 1

2 Likes

Hello guys i am trying to create a loop task. But my blocks not working

Blocks

Device : Realme 3i
Android Version : 10

1 Like

Version 1.2

  • Adds features
    • Ability to control if the service should run while (app active / down)
    • Periodic Tasks
    • Cancel Feature

And various internal fixes.


  • Periodic Tasks

image

This is one of the demanded feature, and is here.
Minimum interval for Android 6-7+ is 15 mins.

Here, it is necessary to use FlagEnd block.
This does not use alarm-manager API so executions will be decided by the System/Phone.


  • Cancel Block

image

Cancels the background service.


  • Changes to Initialize Block

image

Added “runWhileActive” property. If set to false, service will not executed if the App is Currently active. If set to true, it will execute anyway, this can cause unexpected behaviour (i have to do more testing, soon there will be a block to know.).


Download:
xyz.kumaraswamy.itoo.aix (21.8 KB)

4 Likes