AutoNotification Priority setting doesn't work as expected

Discussion in 'AutoApps' started by lokkenmor, Apr 5, 2019.

  1. lokkenmor

    lokkenmor New Member

    Joined:
    Apr 5, 2019
    Messages:
    3
    Likes Received:
    0
    Hi,

    Trying out AutoNotifications (triggered via Tasker) and I want to set a Button notification to always be at the top of the notification stack.

    From the documentation, setting the value of the `Priority` option to MAX should achieve this, but it doesn't have that effect - instead the Notification takes a middling position in the stack with other notifications often taking precedence above it.

    I've looked at the Taker XML and using the MAX priority option gives a numerical value of `2` to the notification. Based on the documentation, that's the pre-API 24 standard of notifications having values between -2 and 2 (incl.). According to the post-API 24 documentation, priority should have values between 0 and 5 (incl.), set using the newer `NotificationChannel.setImportance(int)` method call (
    https://developer.android.com/reference/android/app/NotificationChannel.html#setImportance(int)).

    Manually hacking the Tasker XML to use a value of 5 results in a crash.

    - Is setting Notification Priority to MAX and having the notification appear in the middle of the notification stack expected behavior?

    - Is there a work-around to permanently force a notification to the top of the stack when it's being displayed?

    - What's the likelihood of this being fixed, and what's the probable ETA?

    Many Thanks,
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,477
    Likes Received:
    806
    AutoNotification already sets importance to max (5) on newer Android devices. :)
    Android doesn't take into account that number alone though. Try setting a vibration pattern and sound on the notification too. That will make it appear higher.
     
  3. lokkenmor

    lokkenmor New Member

    Joined:
    Apr 5, 2019
    Messages:
    3
    Likes Received:
    0
    My device is a Nexus 6P running Android 8.1. I'm aware that it's a few years old but it has support for the newer version of the API.

    I already had a vibration pattern and sound set, but the notification's still of middling priority.
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,477
    Likes Received:
    806
    Can you edit its importance in the category setting in Android Settings?
     
  5. lokkenmor

    lokkenmor New Member

    Joined:
    Apr 5, 2019
    Messages:
    3
    Likes Received:
    0
    That is a whole new category of setting I didn't previously know existed.

    Yep, I've upgraded it's Importance via the Android Notification settings menus and it works better now. It's still getting overtaken by other applications but I think that's just to be expected.

    Thanks for the help, that's more of less sorted that out for me (or at least gives me more options to play with).

    Cheers
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,477
    Likes Received:
    806
    Great :D
     

Share This Page