FORUMS
Remove All Ads from XDA

Trying to make my own notification reader, but I'm having issues. Help?

61 posts
Thanks Meter: 4
 
By superluig164, Member on 19th August 2019, 11:50 AM
Post Reply Email Thread
First of all here is the link to my profile so you can test it/see how it works.

So, the way I have it set up, it pretty much makes sense. If a notification comes in, and the notification reader is enabled (using AutoNotification Tile 3) then the task is run. The task first waits two seconds, for the notification sound, then checks to see if %Speaking is false. If it's false, it continues on to read the notification with WaveNet, otherwise it continues to wait. If %Speaking is false, it sets it true, then reads the notification (with a whole bunch of different events because I am checking for a lot of variables, namely %UserMusic, which is used by my other profiles to declare when I have an audio device connected, thus the reader reads through the Media Channel, and also it interprets different apps' notifications in different ways, but this is mostly irrelevant to my issue.) and once that's finished, it sets %Speaking back false. This way, if multiple notifications come in at the same time, the tasks don't talk over each other (this is what was happening before I implemented the variable checks.)

Except that's not what happens. Instead, for god knows what reason, 90% of the time, %Speaking never gets set back false, so Tasker gets stuck waiting forever and now my tasks stop working because the queue is filled up with notifications. I cannot for the life of me figure out what the heck is going on. And here's the kicker, it works sometimes. I've seen it work - I've sat there watching the variable switch from false and back to true in a split second and everything works fine. But for some reason that only happens a couple of times and then it stops again.

Can someone a little more savvy with Tasker help me out?
 
 
21st August 2019, 12:04 AM |#2  
ktmom's Avatar
Senior Member
Thanks Meter: 2,091
 
More
When you've seen it work compared to not work, is three a difference in the volume notifications? Maybe adding a brief wait before resetting %Speaking back to false to allow things down a bit. Add a brief cool down period (long press the profile name to select it and tap the gear at the top of the screen).

Things happening to fast sometimes cause these types of problems.
21st August 2019, 12:11 AM |#3  
OP Member
Flag Oakville
Thanks Meter: 4
 
More
Quote:
Originally Posted by ktmom

When you've seen it work compared to not work, is three a difference in the volume notifications? Maybe adding a brief wait before resetting %Speaking back to false to allow things down a bit. Add a brief cool down period (long press the profile name to select it and tap the gear at the top of the screen).

Things happening to fast sometimes cause these types of problems.

Honestly, not really, once it runs out of notifications to read it sits dormant. I have woken up in the morning (having left it on overnight) and Tasker had a full queue, and none of the notifications were all that close together, and I've seen it get stuck when many come in at once. Even after just one notification, it sometimes fails to set that variable false. Even just running the task on its own can sometimes cause it to stay true afterward, and it works less often than it doesn't. When it does work it's great, but it doesn't work enough to rely on it.

The reason I don't want to add a cooldown is because then it might miss notifications. However, maybe I can try adding a wait action at the end after (or maybe before) the variable is set false. Might that help?
21st August 2019, 02:28 AM |#4  
ktmom's Avatar
Senior Member
Thanks Meter: 2,091
 
More
Quote:
Originally Posted by superluig164

Honestly, not really, once it runs out of notifications to read it sits dormant. I have woken up in the morning (having left it on overnight) and Tasker had a full queue, and none of the notifications were all that close together, and I've seen it get stuck when many come in at once. Even after just one notification, it sometimes fails to set that variable false. Even just running the task on its own can sometimes cause it to stay true afterward, and it works less often than it doesn't. When it does work it's great, but it doesn't work enough to rely on it.

The reason I don't want to add a cooldown is because then it might miss notifications. However, maybe I can try adding a wait action at the end after (or maybe before) the variable is set false. Might that help?

I would try a wait in the task. The overnight thing might be due to power management issues.

Have you gone through all of the steps to make sure tasker (and associated plugins) are not being killed?
21st August 2019, 02:42 AM |#5  
OP Member
Flag Oakville
Thanks Meter: 4
 
More
Quote:
Originally Posted by ktmom

I would try a wait in the task. The overnight thing might be due to power management issues.

Have you gone through all of the steps to make sure tasker (and associated plugins) are not being killed?

Yep. I have a Note 9 and I've added Tasker and AutoNotification as exceptions to the power management rules.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes