AutoNotification Autonotification Repaint

Discussion in 'AutoApps' started by basixs, Aug 3, 2015.

  1. basixs

    basixs New Member

    Joined:
    Aug 3, 2015
    Messages:
    2
    Likes Received:
    0
    I have searched and searched and it seems there is no way to repaint a notification, one can only 'over-write' it.
    While I am genuinely impressed by Autonotifications this failing has me shaking my head. How for instance is one supposed to create and update a notification with a progress bar? An external loop and re-posting the exact same notification is the only solution I have found. Not only does this create a needless loop, which makes any other notifications react (contract) on every update and is very ugly, but it also goes against the very heart of the Android notification model.

    A simple solution that I see would be to have the repainting in Autonotification itself. Variables are already available (for most aspects of the notification) so if the notification simply repainted itself at a given interval the rest of the updating would take care of itself. In the Plugin interface (I use tasker) a checkbox to enable repainting and a slider to set the delay seems like all one would need to add besides the actual logic to repaint of course.

    Thanks for all of the amazing work here. I am not trying to be a naysayer of this awesome system, just trying to help make it better.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hi there.

    Unfortunately that's just how notifications work on Android. There's no built-in way to update a notification. It doesn't go "against the very heart of the Android notification model", it is the notification model :)

    If you use the same ID for notifications the will overwrite each other and effectively update itself. That's how all apps on Android do this.

    I've played around with a custom way to update a notification from Tasker but haven't had much success. It would still just be "sugar coating" it, because in the background a notification has to always be overwritten.

    Hope this clarifies it.
     
  3. basixs

    basixs New Member

    Joined:
    Aug 3, 2015
    Messages:
    2
    Likes Received:
    0
    Thank you for your reply. I apologize for my assumptions.

    I guess I am still wondering how other notifications manage to update themselves without any other notifications getting 'shuffled' around.

    I have a persistent notification with a progress bar that gets updated once per second. If I have another persistent notification (say navigation from Google maps) then these 2 notification will constantly 'fight' each other for the top spot on the notification bar. Other than setting different priorities on them is there any way to stop this behavior?
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Maybe Google Maps is also constantly updating its notification? :) Have you tried lowering your notification's priority?

    Other apps do the same thing: they post new notifications with the same ID and Android will replace the previous one.
     

Share This Page