How to run a procedure in the background using background tasks version 4.0

I want to run a procedure every minute or so even while the app is closed, I downloaded background tasks version 4.0 extension and tried doing it but I don’t understand how that works. All I want is one procedure running every minute in the background.
Thanks in advance.

1 Like

Thank you so much for the the awesome explanation of every block. I’m gonna try that right now.

1 Like

Thanks I’ve done it, I have 2 questions though. 1 how do I now run the call function every minute and 2 if I put all the blocks in Screen1.Initalize instead of Button1 will it repeatedly create tasks?

(Attempt to invoke virtual method ‘java.lang.Class java.lang.Object.getClass()’ on a null object reference
Note: You will not see another error reported for 5 seconds.)
please solve this error

For that, it might be complicated, you will need to use possibly a clock mechanism, because incase the foreground stops you wont be able to call procedure even if it starts again.

You are testing in companion which dont work.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.