Notifications and background activity

thank you Taifun , now the code works properly but still need to modify it to suit my blocks.
notice the blocks now please


This is working , I get a notification every 8 seconds even if the app is not working.
I need now to show this notification under a certain condition , for example if statement.
any ideas please ?

if certain condition
Then Notification.Style1.SimpleNotification

Taifun

I put a checkbox , and if it's checked , show notification
that didnt work
blocks 22223

here is the aia file if needed
SimpleItooCloudDB.aia (116.3 KB)

Your blocks are improper, I find 3 mistakes.

Here bgCloudDB is the main background procedure. Not bgNotification.
Also you are supposed to include argument "x".


You cannot use UI Components in background, you need to save the state of the checkbox (true/false) into Itoo's storage using Store property and call it in background.

1 Like

It worked well , thank you
now the notification is shown when the timer fires up , every 8 seconds
now , I want to make the notification to show once , just when something happen , i mean , i dont want it to be shown many times under the condition of the timer
Thank you very much , your help is highly appreciated

When what exactly happens?
I already provided the general solution earlier

Taifun

1 Like

You need cooldown logic, where you keep track of when you last notified for this, how long ago was that, and what cooldown interval (Duration) do you want to pass before allowing the next notification.

1 Like

I succeeded to get a notification once , under a certain condition , in a independent project.
now I wanted to use that idea in my main project.
I am getting data from clouddb1 using got value , this value is true/false , in the TenMinTimer , if that value is false for 20 seconds - using a counter to 20 , I show a notification.
I am getting the notification after 20 seconds , but my problem is that this doesn't work in background.
Any help here ? thank you

I have no experience with background extension operations, sorry.

Read again the first post of the itoo thread and try the example project how to connect itoo and CloudDB. Remember, you already tried it here Notifications and background activity - #53 by Mathematics_With_Ahm

Obviously your foreground logic will not work in the background... you have to rewrite it and use event handlers, which look like a procedure, see also again the guidelines how to use itoo from post #4 Notifications and background activity - #4 by Taifun

Taifun

I really appreciate your help
But i still couldn't do it myself
I don't know where to start and how to do my whole code as a procedure
If you have a simple example please
Note: if anyone has a paid help i can pay for re writing my app

We are at post 75 meanwhile in this thread and we were talking from the beginning about how to do it... actually you already started...
At this point I only can say, read this thread from the beginning again
Try something and if you got stuck, post a screenshot of your relevant blocks
And for paid help, just send me a PM or email

Taifun

3 Likes