Custom notification sound for a specific app

33 views
Skip to first unread message

​ ​man

unread,
May 28, 2022, 10:01:29 AMMay 28
to Automate
Hi! I've created a flow that waits for a notification of a specific app* and then plays a custom sound as a ringtone. The app is silent (by itself or due to OS settings). 
The problems are that:
1) sometimes it's rings more than once, when this app's notification appears, 
2) when this app's notification remains unread it rings later again and again, I think it happens everytime any app's notification appears. 

Is this a bug or a setting that I'm not aware of? Should I add a specific block? Should I somehow test the id of the notification? 

*) I use Messenger Lite (I don't want full Messenger) which doesn't play any sound on notifications and doesn't let me edit any ringtone settings. 

FLOW_Messenger Lite pop sound.png

​ ​man

unread,
May 28, 2022, 10:04:46 AMMay 28
to Automate
The first point is not really a big issue. What I'm trying to deal with is the second point. 

Henrik "The Developer" Lindqvist

unread,
May 29, 2022, 8:57:00 AMMay 29
to Automate
Maybe the Facebook app is updating the notification, that will also trigger the YES path.

​ ​man

unread,
May 29, 2022, 5:12:33 PMMay 29
to Automate
That can be a clue. I'm suspecting the same. I looked closely / spied on notifications for some time and I heard no sound during other apps' notifications but I heard sound while nothing happened. 
1) May it be that Messenger updates the notification even when nobody messages me?
2) If yes, then how can I filter that out? By checking if the content of notification changed? ("message" / "ticker text" / "dictionary of extras" array of additional texts"?) 

Henrik "The Developer" Lindqvist

unread,
May 30, 2022, 9:06:10 AMMay 30
to Automate
A sound is only played for new notifications, not for updates.
  1. It's possible, and not uncommon.
  2. Currently the only way would probably be checking if any of its content has changed.
    The Android API does seem to have an "post time", i'll consider adding and output variable for it.

​ ​man

unread,
Jun 4, 2022, 3:01:49 PMJun 4
to Automate
The "post time" variable would be handy, I think :) I have not tested "timestamp" yet, though. 
For now I know, that the app posts a notification and triggers the YES path a few times at that moment (maybe updates the notification even if no charge). I filter that out with storing IDs (ID is unique for every chat, either personal or group) and 'extras["android.text"]' (text content of (last?) message) in memory. As a new notification appears they're put to a dictionary and removed when the notification is removed. That really blocks many unnecessarily triggered YESes. 

Reply all
Reply to author
Forward
0 new messages