MacroDroid won't recognize notifications consistently...

WATYF

New member
I'm trying to set up a macro that will fire when a particular notification is present in my notification bar. The problem is that it does not consistently detect this notification or any notifications.

First, sometimes the app doesn't fire at all because it appears that it's been shut down. If I start the app it will then start noticing the notifications. I did turn off power optimization for this app but that still isn't solving the problem. Some aspect of my phone appears to be killing this app randomly and I'm not sure why.

Second, and the main issue, is that sometimes even when the app is running it will not recognize that there's a notification present. I have it set up to only notice certain applications and even certain types of notifications from those applications. However, even if I set it up to trigger on ANY notification from ANY app it still doesn't fire even when a notification is present in the bar. However if I set it to trigger when NO notifications are present, the trigger will fire even when a notification is sitting right there in the notification bar. So I know the problem is that it simply isn't recognizing notifications that are there. I can deal with the first issue because it's only occasionally that the app gets shut down. It's this issue that's really a problem since the app is running but it simply isn't doing what I want it to do because it doesn't recognize any notifications. In other words, if I could only get one of these issues fixed, it would be this one.

Any ideas would be appreciated.
 

Endercraft

Moderator (& bug finder :D)
WATYF said:
First, sometimes the app doesn't fire at all because it appears that it's been shut down. If I start the app it will then start noticing the notifications. I did turn off power optimization for this app but that still isn't solving the problem. Some aspect of my phone appears to be killing this app randomly and I'm not sure why.


However if I set it to trigger when NO notifications are present, the trigger will fire even when a notification is sitting right there in the notification bar.
How did you do this ?
If you used something like that :
Screenshot_2023-03-18-10-10-21-218-edit_com.arlosoft.macrodroid.jpg
Then know that it will trigger on any notification that you cleared or clicked on and disappeared.
 

dhj49er

Well-known member
What phone do you have?

Are you sure the 2 issues aren't interelated?

I think solving the first may help with the second.
 

WATYF

New member
I looked at dontkillmyapp, but none of the tricks there worked (or the options they said to modify don't exist on my phone). I am currently running a benchmark for several hours to see if it comes up with anything.

To detect notifications when they arrive, I use Notification Received. To test when it is correctly seeing the notifications, I use Notification Present. May Macro is setup as such:

Trigger: Notification Received from specific app.
Action: While Notification Present from specific app, do such and such.

In testing, I removed the criteria for the specific app to see if it detected any notifications at all, or thought that none were present. It thought none were present even when one way.

My phone is a Moto G Power (2021).

I know the two issues aren't related because I have other macros which also stop working when the app gets "killed". They are simpler macros. So, once I start up MacroDroid, these simpler macros start working again, but the "notification" macro still doesn't detect a notification that is present at the time.
 

dhj49er

Well-known member
So, once I start up MacroDroid, these simpler macros start working again, but the "notification" macro still doesn't detect a notification that is present at the time.
I would still get Macrodroid to run in the background on your phone as a priority. In my opinion this is an absolute necessity.
I don't have your notification issue on my phone. So I don't think it can be a Macrodroid issue.
 

Endercraft

Moderator (& bug finder :D)
I think notification access can be the issue here. I'm pretty sure this isn't a setting that's disabled on app kill (I believe it does reset on reboot of Xiaomi devices), but it may be.
 

WATYF

New member
I think notification access can be the issue here. I'm pretty sure this isn't a setting that's disabled on app kill (I believe it does reset on reboot of Xiaomi devices), but it may be.

How do I allow notification access? Also, sometimes it does recognize the notification, so I'm not sure it's an access issue.
 

WATYF

New member
I would still get Macrodroid to run in the background on your phone as a priority. In my opinion this is an absolute necessity.
I don't have your notification issue on my phone. So I don't think it can be a Macrodroid issue.
How do I setup MacroDroid to run as high priority? Does it require root? (This phone isn't rooted)
 

Jacob L

Moderator (Lawsonator)
How do I setup MacroDroid to run as high priority? Does it require root? (This phone isn't rooted)
Don't need root. I know dontkillmyapp.com has steps, some people find this doesn't help so I set MacroDroid as device administrator (settings>security>device administrator) and device assistant (settings>apps>defaults>assistant). Dontkillmyapp.com has a Github as it's open source so have a look at the issues and pull requests for extra info.
 

WATYF

New member
Don't need root. I know dontkillmyapp.com has steps, some people find this doesn't help so I set MacroDroid as device administrator (settings>security>device administrator) and device assistant (settings>apps>defaults>assistant). Dontkillmyapp.com has a Github as it's open source so have a look at the issues and pull requests for extra info.

That's an interesting idea. I'll try it out and see if it at least solves the first issue. Still not sure what's up with the second issue.
 

WATYF

New member
Every device is different but usually: settings>apps>permissions>special access>Notification access
Ok, I found it on mine. Setting > Apps > Advanced > Special app access > Notification access.

Problem is, MacroDroid already has Notification access (I probably granted it while setting up the macro initially). And it's currently running and other macros are working but this one macro still won't work. The notification is sitting in my bar right now, but when I test the trigger to detect any notifications, it doesn't see it.

At this point, I think all of the other suggestions have kept the app running consistently, and now the only remaining issue is the second one (which incidentally is the most pressing one).
 
Top