hey guys , I am making an application that shows on android panel a notification like whatsapp notifications - for example , and shows that notifications even if the screen is off , and I want my application to be working in background.
I've found this link that shows an extension
my problem is I tried so much , and I couldn't find out how to use this extension , or maybe I didn't get a notification.
Note: I am using android 13 , and I am using mit companion
Kindly do you have a picture for a sample block
In the link there is an every second notification blocks sample, but in the extension events there is no call notification
The example uses itoo together with the modified notification style extension
Guidelines for using Itoo
First get your background functionality running in the foreground. Like this, you can find errors much easier. And as soon as you got it working in the foreground, then test it in the background.
Do not use global variables while in the background, use local variables instead
Do not use any user-visible or UI components in the background
In the background, use the Itoo StoreProperty/FetchProperty methods rather than TinyDB. TinyDB relies on SharedPreferences which will not ensure data synchronization across background processes.
Thank you for your replies
I tried yesterday but i couldn't find how to achieve my work.
I am getting data from the redis database to my application, i just need to send the data collected from the database as a notification every 5 minutes, such that even when the application is not shown or even if the application is not started by the user.
Your help is so much appreciated
Hello , thanks for your reply
I am using these blocks , for test purposes only
what's happening here is just getting 2 notifications , one is "How are you" which is I don't need - it happens once only
and I got a notification every second "Important Note" - knowing that I have a timer of six seconds interval , also I am using it just for test purposes
I want this notification to happen under if condition.
notice that I am using ltoo1 and NotificationStyle1 extensions
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
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
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
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