Open Source • Background Tasks: Itoo 🚀

blocks (5)

This works in that way, that I get a notification also on another device, but only when the app is open :see_no_evil:

1 Like

Where are you creating the foreground or background process?

Also you should use the RegisterEvent block in the procedure itself and not outside.
And the procedure "check_clouddb" is missing two arguments, you need to add a value called "tag" and "value" that should match to the original DataChanged event.

That´s my question...where and how I have to do it.

Ok, I´ll change this

Can you give me an example? I don´t understand what you mean right now :see_no_evil: :woozy_face:

1 Like

You just have to use the "CreateProcess" Block

Just add two more inputs for the procedure.

In the screen initialize block?

What kind of inputs? (I think I have a blackout now :exploding_head: :joy:)

1 Like

Check the "Adding Parameters to Your Procedure" part:




blocks (5)

Yeah thats right

2 Likes

Thanks,
but I realized, that this is to global...I built in a further routine.
I post the blocks and figure out if it works in the background....

Blocks

blocks (1)

blocks (5)

It doesn´t work.
When installed the app crashes after a little while and on the other device there is no notification, when I change the value in clouddb :thinking:

Maybe I´m on a complete wrong way...
What I need:
The app is for my clients in my dog training school. I administrate the tickets for group classes with it and thatr works fine. But it also should give the possibility to show messages in it considering the group classes. That also works.
What I need is a routine, that checks if the value in cloud db had changed (e.g "every hour" or "every Tuesday at 12 oclock") working in the background (when app is closed) and if it changed create a notification.

You are calling the wrong procedure in the create process, you should be calling a main function, which accepts an argument called x, there you have to register the event and call GetValue block.

I wont be able to respond much with examples, no time, :(

What main function do you mean? e.g.?

It refers to the procedure name you pass to the CreateProcess or CreateTask block.
You should try out examples before you try out the big things.

I understood that, but which main function must be called in the CreateProcess block?

1 Like

Any suggestions? :thinking:

Anybody a solution? So many pro´s here and nobody an idea?

This is a specialised area, you probably need to wait for @Kumaraswamy ....

1 Like

I'm sorry.
The argument in the CreateProcess | CreateTask's procedure = main function.
Eg:

image

In the above image, the main function is "clock" and it takes x parameter.

Also, there will be delayed responses for a month.

1 Like

4 posts were split to a new topic: How to count from 0 to 100 when the app is closed