I want for example , a checkbox , when checked to get a notification , even if the application is not opened - I want it to work in the background
I hope you get my idea
I really appreciate your help , many thanks
use the StoreProperty method to store the checkbox.checked state
and in your timer procedure add an if statement to check the checkbox.checked state using the FetchProperty method of itoo
Taifun
I did this , kindly checkout the blocks
I am getting the notification after 6 seconds correctly , It worked
but , I still need the application to work in the background , even if the user killed all application.
is that applicable ?
the Clock1.Timer event will not work in the background, you have use your background event handler which looks like a procedure, you correctly registered your timer procedure for this, see also my example for Jeff here Maintain the activity of an application in the background - #25 by Taifun
and just follow my suggestion
Taifun
I am sorry for too much questions , but I still couldn't find a solution
here is my main project block , notice the notifier show alert , I just want my app to work in background , and send a notification like whatsapp notifications , in the place where the notifier shows alert.
It helps to be clear about your requirements... you now showed us a screenshot using CloudDB...
Unfortunately itoo is currently not compatible with CloudDB... see also here
Taifun
so as I understand , an application that uses clouddb , can't work in the background ?
kindly check this extension
https://ullisroboterseite.de/android-AI2-KeepAlive-en.html
do you think this extension can achieve what I need in my application ?
I do not know, I'm not familiar with that extension... itoo is the most powerful extension concerning background functionality...
just experiment yourself and let us know what you find out...
See also @SteveJG 's comment and example here
Taifun
The new update now adds compatibility with CloudDB.
kindly would you help me please here , I want my application to send notifications even if it's killed not working , like whatsapp for example , it sends notification even if the app is closed
SimpleItooCloudDB.aia (82.2 KB)
I cannot help you with everything totally making the app. But here's what that might help you start.
thank you,sure I dont want everything, my code is ready , I just need the notification issues.
why do I need the clouddb here ? I dont understand what is its use here
I think , you miss understand the purpose of my application.
I have a sensor on arduino that senses the absence of electric power , so it sends me the data to a redis data base
on MIT app side , I read those values from the database , and sends a notification displaying those data according to a certain criteria.
everything is ready , but what i need now is to make this app sends notification even if the app is not working , even if the app is closed - I want to it to work in background even if it's killed by the user , so that it still sends notification all time
the latest screenshot you showed us was about CloudDB
so this is a CloudDB, isn't it?
your logic in the background is more or less "if CloudDB.DataChanged then send notification"... isn't it?
Taifun
I guess that is the purpose here? We can use CloudDB to listen to data changes and send a notification accordingly, what else do you want?
There was some miscommunication, we believed you would want to achieve "sending notification when the app is closed through CloudDB".
Okay so, let me try to help you, how would you know when to send a notification to the user?
I need , the app to send notifications even if the app is not working - like telegram for example it still sends us notifications even if its not working or even its not opened by the user.
Alright how do you know the time when to send a notification? It might help if you describe that to us.
I will make it more clear with an example :
i have data about electricity failure, true : means the electric power is available
false: means the electric power is not available.
I read those values from an online Redis Database
my app , reads those data , if the data is false for 10 minutes , using a timer , it must send a notification for the user " Electric Power is not available since 10 minutes"
then , if it stills not available more , it sends notification every 5 minutes
I can send the blocks if you want me to
Your help is really appreciated thank you