AutoNotification New option for executing button action from button text doesn't work properly

Discussion in 'AutoApps' started by soumyaranjanmahunt, Jan 6, 2019.

  1. soumyaranjanmahunt

    soumyaranjanmahunt Member

    Joined:
    Oct 8, 2018
    Messages:
    120
    Likes Received:
    4
    The beta update introduced executing button action when button text is provided.

    I have set up a profile for different chat apps to mark message as read if i swipe their notification. I used to provide button id which has mark read text which worked flawlessly for single and multiple notification. But the new method only works for single notification.

    In the profile description the disabled options are new methods and enabled ones are old ones.

    Profile: Mark Chats As Read (19)
    Event: AutoNotification Intercept [ Configuration:Event Behaviour: true
    Notification Type: Only Cancelled Notifications
    Cancel Reason: User cancelled,User cancelled all,Member of cancelled group,Other app cancelled,Other app cancelled all
    Notification Apps: WhatsApp,SMS Organizer,Telegram,Messaging ]
    Enter: Anon (28)
    A1: AutoNotification Actions [ Configuration:Intercept Action ID: %anbutton1action Timeout (Seconds):0 ] If [ %anbutton1text eq Mark as read ]
    A2: AutoNotification Actions [ Configuration:Intercept Action ID: %anbutton2action Timeout (Seconds):0 ] If [ %anbutton2text eq MARK READ | %anbutton2text eq Mark as read ]
    A3: AutoNotification Actions [ Configuration:Intercept Action ID: %anbutton3action Timeout (Seconds):0 ] If [ %anbutton3text eq MARK READ ]
    A4: Flash [ Text:%ancancelreasontext:%ancancelreason Long:On ]
    A5: [X] AutoTools Text [ Configuration:Text: Mark as read
    Best Match: %anbutton1text,%anbutton2text,%anbutton3text
    Joiner Variable: atjoinedtext
    Separator: , Timeout (Seconds):60 ]
    A6: [X] AutoNotification Actions [ Configuration:Button Text: %atbestmatches() Timeout (Seconds):20 ]
    A7: [X] Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ]
    A8: [X] Flash [ Text:%atbestmatches() Long:Off ]


    Sent from my ONEPLUS A5000 using Tapatalk
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you please check what's in %atbestmatches() before A6 is ran?
     
  3. soumyaranjanmahunt

    soumyaranjanmahunt Member

    Joined:
    Oct 8, 2018
    Messages:
    120
    Likes Received:
    4
    I flashed %atbestmatches() and it works perfectly,
    For example it is Mark as read in Whatsapp, MARK READ in SMS Organizer.

    Sent from my ONEPLUS A5000 using Tapatalk
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    And if you create a test task that simply uses the action to press "Mark as read" for example, it still doesn't work?
     
  5. soumyaranjanmahunt

    soumyaranjanmahunt Member

    Joined:
    Oct 8, 2018
    Messages:
    120
    Likes Received:
    4
    I used to do that with first 3 actions, and it worked well. The new method fails.

    Sent from my ONEPLUS A5000 using Tapatalk
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Sorry, I meant a new task with just an action using the new method.
     
  7. soumyaranjanmahunt

    soumyaranjanmahunt Member

    Joined:
    Oct 8, 2018
    Messages:
    120
    Likes Received:
    4
    If you mean just a task with the button text input and the app selected (no context) then yes it did.

    Sent from my ONEPLUS A5000 using Tapatalk
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you please export that so I can check? thanks
     
  9. soumyaranjanmahunt

    soumyaranjanmahunt Member

    Joined:
    Oct 8, 2018
    Messages:
    120
    Likes Received:
    4
    Here it is:

    Test (53)
    A1: AutoNotification Actions [ Configuration:Button Text: read (regex) (case ins)
    Notification App: Whatsapp Timeout (Seconds):20 ]


    Sent from my ONEPLUS A5000 using Tapatalk
     
  10. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
  11. soumyaranjanmahunt

    soumyaranjanmahunt Member

    Joined:
    Oct 8, 2018
    Messages:
    120
    Likes Received:
    4
  12. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hi. I just tried this:
    • Receive a whatsapp message
    • run the action with just Button Text set to Mark as read
    • It dismissed the notification
    Is this what you're doing and it's not working for you?
     
  13. soumyaranjanmahunt

    soumyaranjanmahunt Member

    Joined:
    Oct 8, 2018
    Messages:
    120
    Likes Received:
    4
    No, my profile was when i dismiss the whatsapp notification (by swiping away), AutoNotification intercepts the notification and runs the button task which matches text "Mark as read".
    In short marking chats as read when i dismiss or cancel them.

    Sent from my ONEPLUS A5000 using Tapatalk
     
  14. soumyaranjanmahunt

    soumyaranjanmahunt Member

    Joined:
    Oct 8, 2018
    Messages:
    120
    Likes Received:
    4
    Also i set up another profile which should turn on loudspeaker when proximity sensor not close and turn off when proximity sensor is close.

    When it is run for the first time(when i just make or receive call) it shows error AutoNotification can't find action to perform, works fine through out the call then.

    Description of profile;

    Profile: Adaptive Call Output (32)
    State: Not Proximity Sensor
    State: Call [ Type:Any Number:* ]
    State: Not Headset Plugged [ Type:Any ]
    Enter: Anon (33)
    <Turn on loud speaker>
    A1: AutoNotification Actions [ Configuration:Notification Apps: Phone
    Button Text: speaker on (regex) (case ins) Timeout (Seconds):20 ]
    <Inform turning on loud speaker>
    A2: Flash [ Text:Turned speaker on Long:Off ]

    Exit: Anon (35)
    <Turn off loud speaker>
    A1: AutoNotification Actions [ Configuration:Notification Apps: Phone
    Button Text: speaker off (regex) (case ins) Timeout (Seconds):20 ]
    <Inform turning off loud speaker>
    A2: Flash [ Text:Turned speaker off Long:Off ]


    Sent from my ONEPLUS A5000 using Tapatalk
     
  15. soumyaranjanmahunt

    soumyaranjanmahunt Member

    Joined:
    Oct 8, 2018
    Messages:
    120
    Likes Received:
    4
    I think i have figured out the issue, coeerct me if i am wrong,

    The button text matching takes place only with the notifications available currently where as i trigger the task when i cancel a notification, so if i cancel the whole Whatsapp notification it shows error, on the other hand if i cancel only one notification from a group it just marks the message next in the queue as read.

    My previois task directly executed the button action via id so it didn't show any error.

    If what i have said is the case, can it be modified so that it matches the button text processed currently(triggered by the AutoNotification intercept context).

    Sent from my ONEPLUS A5000 using Tapatalk
     
  16. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    That's what I was going to say :) In that specific use case you gain nothing by using the new easy method, in fact it doesn't work because the notification is not present.
    In this case simply continue using the ids like before!
     
  17. soumyaranjanmahunt

    soumyaranjanmahunt Member

    Joined:
    Oct 8, 2018
    Messages:
    120
    Likes Received:
    4
    Can you comment on this one it shows error when i take up the call while the phone is away(proximity sensor not covered), but when i bring the phone upto my ear and then take it away it works as expected.

    Sent from my ONEPLUS A5000 using Tapatalk
     
  18. soumyaranjanmahunt

    soumyaranjanmahunt Member

    Joined:
    Oct 8, 2018
    Messages:
    120
    Likes Received:
    4
    If the ids were stored in array for a notification instead of a variable for each one, the task would have been easier. Now i have to use a lot of if-else conditions.

    Sent from my ONEPLUS A5000 using Tapatalk
     

Share This Page