🔔 MelonNotification • Various styled notifications + Itoo

You are randomly changing things

Formerly you defined handleButtonClick2 in an createItooIntent procedure, which runs in the background and in the background there are no user interface components

Why don't you just follow the example as it has been provided?

Understand the difference between foreground and background and use the corresponding procedures

Taifun

ok here are the exact blocks same as the example so how can i call close button to close notifications, lets show me a similar block

I think in the buttonclickevent2, add one helper and add the stop process inside a local variable and in this local variable just call this helper and you will find it is working

Currently you set AlwaysOnMain to true

From the documentation

For the close button I would set it to false and use your existing procedure without the label (because you want it to run in the background)

Try this for the close button
In case it does not work as it should work, show us a screenshot of your updated relevant blocks and explain what happens and what you want to happen instead

Taifun

it is still doesn't work, close and open are opening the app screen


here is the sheet as well that is coming from


so if i changed 8 to 6 less than 7 then it will stop but i should make it stop from the app to just notify the customer with the num exceeds and then he can open the app or close the notifications and the voice

I would try this following the documentation from 🔔 MelonNotification • Various styled notifications + Itoo - #8 by Kumaraswamy to have the functionality for close in the background

  1. Replace this procedure call by getStartIntent

  2. Replace the name closeIntent by close

  3. Remove the label and move the 2 procedures there

Taifun

its still the same as before not working, close is still opening the app screen

Try this


Taifun

still not working close now is not opening the screen but not working too but i suggest to make the clock time interval as 0 by clicking on the close button i added it with the itoo close but the notification itself didnt work

Very good

As asked earlier

???

Taifun

here are all blocks, lets check, close button is not opening the app screen but not working for closing the sound and notifications

i meant that its keeping notifying because of the clock so how can we make clock stopped using the close button as i tried before and added it with close itoo but the notification didn't work at all?

To stop the clock add a

Set Clock1.TimerEnabled to false

in procedure handleButtonClick

Taifun

still not working the notification is still working

It looks like procedure handleButtonClick will not get triggered in the background
Add a debug statement using the Notifier LogInfo method in that procedure and use logcat to find out what's going on

Taifun

could you please post your updated .aia file so that I can check?

here is the aia file
gVizQueryDemoTaifun2_2_1 (1).aia (1.2 MB)

It is a bug in the extension, the behavior for alwaysOnMain is inverted. Please set it to true for the time being until the next update.

Does this extension work for all versions of Android?

Also after a certain amount of time, I am getting a runtime error, I am using Android 12

Why is that?

Do you get this in companion app when you switch to another app ?