AutoNotification Getting duplicate AN notifications

Discussion in 'AutoApps' started by tboooe, Nov 11, 2017.

  1. tboooe

    tboooe Member

    Joined:
    Oct 20, 2017
    Messages:
    72
    Likes Received:
    1
    I have AN set to block notifications from my bank. This works. I have a profile that intercepts the SMS then creates a new AN notification. I use a filter to only intercept a very specific message. This issue I am having is that the AN notification occurs twice. The second one happens a few seconds after the first one. I put a counter into my entry Task that increments each time the entry Task in executed. I can confirm that the counter goes from 1 to 2 so for whatever reason AN is intercepting 2 separate identical notifications. I checked and the %anid for each notification is different.
    Any ideas why this is happening?
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,450
    Likes Received:
    718
    In the profile condition, did you set it to intercept created notifications only?
     
  3. tboooe

    tboooe Member

    Joined:
    Oct 20, 2017
    Messages:
    72
    Likes Received:
    1
    Yes, in the profile its set to created only. I think my SMS program is creating two separate notifications, 1 for the headsup notification and 1 for the normal one. Have you seen this before?
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,450
    Likes Received:
    718
    I haven't no. What android version are you using?
     
  5. tboooe

    tboooe Member

    Joined:
    Oct 20, 2017
    Messages:
    72
    Likes Received:
    1
    I am on Nougat on a Huawei Mate 9 using the stock SMS app.
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,450
    Likes Received:
    718
    Can you try enabling the "Has Reply Action" in the event condition and see if that goes away?
     
  7. David Dimitriou

    David Dimitriou New Member

    Joined:
    Jul 31, 2019
    Messages:
    4
    Likes Received:
    0
    On searching for a similar issue I found this post. Sorry if its a ressurection!

    I have the spreadsheet tasker plugin populating a spreadsheet with my card activity from my bank. I use Autonotification with the following settings:
    Event Behaviour: true
    Notification Type: Only Created Notifications
    Persistency Type: Non-Persistent
    Has Reply Action: true (added this following this thread)
    Notification Apps: Messages
    Notification Text: Your VISAXXXX has been authorised...

    The strange thing is that the spreadsheet seems to add two identical entries per received text. To confirm this I made the task create a variable (%lastText) with the last %antext value, and then added an if statement that only calls the spreadsheet function if %lastText is different. As soon as I did this then only one line is added to the spreadsheet as desired.

    It's not an ideal workaround, but it works. Would appreciate getting to the bottom of why its happening in the first place.
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,450
    Likes Received:
    718
    Hi. Sorry, not sure how AutoNotification is related to the spreadsheet plugin. Can you clarify?
     
  9. David Dimitriou

    David Dimitriou New Member

    Joined:
    Jul 31, 2019
    Messages:
    4
    Likes Received:
    0
    Sure thing, and sorry if I wasn't clear. Actually the spreadsheet plugin is irrelevant, as the problem lies in the trigger which is autonotification. It seems to fire twice on every notification I receive.
     
  10. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,450
    Likes Received:
    718
    If it fires twice, that means that the app is putting up 2 notifications :) It's really that simple. AutoNotification will only trigger once for each notification. You can do the checks you mention in the task to make sure it doesn't trigger twice for the same content.
     
  11. David Dimitriou

    David Dimitriou New Member

    Joined:
    Jul 31, 2019
    Messages:
    4
    Likes Received:
    0
    Ok, so even if I see one notification in the taskbar, it could be two? Or do you think I'm missing something?
     
  12. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,450
    Likes Received:
    718
    Yes. If an app posts 2 notifications with the same ID in a row for example, that'll happen. Or if an app posts a group summary notification followed by an actual notification with a body then you'll also get this :)
     
  13. David Dimitriou

    David Dimitriou New Member

    Joined:
    Jul 31, 2019
    Messages:
    4
    Likes Received:
    0
    Ok thanks for the explanation, and continued support! Perhaps it has something to do with the notification in the status bar AND the on screen pop up notification? To be more specific, I am using this just with Android Messages app. When I receive a text, I get a pop up and an on screen notification. Perhaps this is considered as two notifications?

    Regardless, do you see a better way to avoid this other than my proposed method of storing the %antext into a %lastText variable, then when comparing the two using an IF statement the task should only fire if the two variables are different? It works, but theres some cases where I get a text from my bank with the exact same message.
     
  14. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,450
    Likes Received:
    718
    You could also check if the notification is a group summary, and in that case ignore it (use the %ansummary variable to check). I'm guessing this is why you're getting 2... It may not be the case though! Did you already enable the Has Reply Action option?
     
  15. operator207

    operator207 New Member

    Joined:
    Aug 2, 2016
    Messages:
    10
    Likes Received:
    0
    I just had this issue with Keep. I had Keep's notifications set to "Make sound and pop on screen". I would get 2 Autonotifications. Moving it to "show silently", and having AN do the rest, left me with 1 Autonotification.
    This is on a P2XL stock Pie ROM with latest security update.
    I'm not sure if it will help, but worth a look into changing your notification settings of the app if you have not already.
     

Share This Page