Crazy Android 11😭

OscariBot

Active member
I just wish we could go backward to our beloveth Android KitKat.

My experience with 8+ is really awful 😕

I was reluctantly enjoying macrodroid on my Android 11 when I got a notification yesterday to update my Android version...
As soon as I updated it I fell back to the same problem I had with android 7 that provoked me to buy this crazy Android 11

What is the problem?
My Macro keep firing twice even though it recieve just one trigger.

At first I was wondering why my macro is behaving in a funny way until I check the system log.

Then I added CANCEL ACTION to cancel the active macro that is running my macro so it could cancel the second firing.
But it didn't stop it.
Then I added IF MACRO NOT ACTIVATED FOR...
..it didn't stop it either.😭😭😭

See the log below...
 

Attachments

  • Screenshot_20230427-050357~4.jpg
    Screenshot_20230427-050357~4.jpg
    56.8 KB · Views: 12
  • Screenshot_20230427-050357~3.jpg
    Screenshot_20230427-050357~3.jpg
    112 KB · Views: 12

OscariBot

Active member
Can you share the whole log and the macro/used trigger ?
Others are very ok.... It too massive... The macros are very complicated.

What you see ther is my only challenge.
The trigger is Notification recieved via Notification Listener plugin
 

dhj49er

Well-known member
Have you tried adding a constraint to the notification received trigger?
Use a Boolean variable as a flag.
The constraint is this variable is false.
First action of the macro set this variable true.
Last action of the macro set this variable false.
This will ensure only 1 instance of the macro can run.
 

OscariBot

Active member
Have you tried adding a constraint to the notification received trigger?
Use a Boolean variable as a flag.
The constraint is this variable is false.
First action of the macro set this variable true.
Last action of the macro set this variable false.
This will ensure only 1 instance of the macro can run.! .... Let me try it

Have you tried adding a constraint to the notification received trigger?
Use a Boolean variable as a flag.
The constraint is this variable is false.
First action of the macro set this variable true.
Last action of the macro set this variable false.
This will ensure only 1 instance of the macro can run.
Oh this sounds like a solution... Let me try it
 

OscariBot

Active member
Unfortunately @dhj49er your idea didn't solve the problem...

The unwanted action somehow manage to cross it.
It seems the two actions are running in parallel ... I just don't understand it.

But viewing the log it's quite obvious that there was two actions.
 

dhj49er

Well-known member
Unfortunately @dhj49er your idea didn't solve the problem...

The unwanted action somehow manage to cross it.
It seems the two actions are running in parallel ... I just don't understand it.

But viewing the log it's quite obvious that there was two actions.
I thought the issue was multiple triggers.
Bit this doesn't seem to be the case.
I'm sorry but I don't know what you mean by unwanted action or two actions running in parallel.
What is triggering the second action?
The same trigger or a different trigger?
Does the system log with constraints enabled show multiple trigger(s) not actioned as constraint not satisfied?
If so, this would confirm multiple triggers and if not the issue isn't multiple triggers.
 

Endercraft

Moderator (& bug finder :D)
Unfortunately @dhj49er your idea didn't solve the problem...

The unwanted action somehow manage to cross it.
It seems the two actions are running in parallel ... I just don't understand it.

But viewing the log it's quite obvious that there was two actions.
If you use the show milliseconds option in log in recent versions does it help ?
 

OscariBot

Active member
I thought the issue was multiple triggers.
Bit this doesn't seem to be the case.
I'm sorry but I don't know what you mean by unwanted action or two actions running in parallel.
What is triggering the second action?
The same trigger or a different trigger?
Does the system log with constraints enabled show multiple trigger(s) not actioned as constraint not satisfied?
If so, this would confirm multiple triggers and if not the issue isn't multiple triggers.
Thanks for your prompt response...

Like I said at first, when the Macro is triggered once (recieved notification via plugin) it fired twice for some reason I don't know and d log prov it so.

(This was my trouble when I was using Android 7 then I switch to android 11 and the problem was resolved completely until last week I updated my Android 11 and this problem resurfaced again. I really wish there is a way to downgrade 😭)

But I also notice something this morning, most of the time it fired once as expected atleast 80% of the time.

But why the 20% double firing? And it defiles all constrain

Still confused about it.
 

dhj49er

Well-known member
Thanks for your prompt response...

Like I said at first, when the Macro is triggered once (recieved notification via plugin) it fired twice for some reason I don't know and d log prov it so.

(This was my trouble when I was using Android 7 then I switch to android 11 and the problem was resolved completely until last week I updated my Android 11 and this problem resurfaced again. I really wish there is a way to downgrade 😭)

But I also notice something this morning, most of the time it fired once as expected atleast 80% of the time.

But why the 20% double firing? And it defiles all constrain

Still confused about it.
I have noticed on a few phones that the WiFi connected trigger can occasionally fire twice.
The way I got round this was to use a Boolean variable to reflect the WiFi connected state called WiFiConnected

I have separate macros for WiFi connected tand WiFi disconnected

The first action in each macro is to set the state of WifiConnected variable.

In WiFi connected macro set WiFiConnected True.

In the WiFi disconnected macro set WiFiConnected False.

Add a constraint to the macro triggers

WiFi connected trigger add constraint WiFiConnected False.

WiFi disconnected Trigger add constraint WiFiConnected True.

The occasional second WiFi connected trigger never runs as WiFiConnected is True .

Could you do something like this to prevent the second firing from triggering the macro?

You could set a variable true at the start of the macro and false at the end of the macro. The trigger constraint would be this variable false. Then a second trigger while the macro is running would be ignored.
 

OscariBot

Active member
I have noticed on a few phones that the WiFi connected trigger can occasionally fire twice.
The way I got round this was to use a Boolean variable to reflect the WiFi connected state called WiFiConnected

I have separate macros for WiFi connected tand WiFi disconnected

The first action in each macro is to set the state of WifiConnected variable.

In WiFi connected macro set WiFiConnected True.

In the WiFi disconnected macro set WiFiConnected False.

Add a constraint to the macro triggers

WiFi connected trigger add constraint WiFiConnected False.

WiFi disconnected Trigger add constraint WiFiConnected True.

The occasional second WiFi connected trigger never runs as WiFiConnected is True .

Could you do something like this to prevent the second firing from triggering the macro?

You could set a variable true at the start of the macro and false at the end of the macro. The trigger constraint would be this variable false. Then a second trigger while the macro is running would be ignored.
I have tried this method using boolean like you suggested, but it didn't rectify the situation. I think your idea will only work if the second macro wait until the first one complete it process hence setting the boolean to false.

But somehow and i still don't know why, the two macro seems to run in parallel same time hence ruining my output... you may never see this unless you check the system log.

I even tried using IF MACRO IS NOT INVOKE constraine, yet it didn't help.

Sound like some kind of macrodroid mystical act.
 

Endercraft

Moderator (& bug finder :D)
Use the millisecond option in system log, detailed filter then share what happens exactly (using a screenshot if necessary).
 

dhj49er

Well-known member
Try the latest beta v5.34.1.

This has a fix for an issue with constraints on notification triggers. ..it might help to resolve your issue.
 
Last edited:
Top