How to update a built-in Notification while it is open?
#1
Hi,

I want to raise a notification using "xbmc.executbuiltin('Notification()')

My question is how can I keep the notification on and updating the text (Like updating the progress) and then close it manually?

Currently what I know is that I can controll the timeout of the notification.

Thanks.
Reply
#2
if youre wanting a live notification like whats shown when updating the library i think youre looking for progress control not notification
Reply
#3
@jepsizofye
Yes, this is what I want. (Not the DialogProgress)
How to do it?
Reply
#4
https://alwinesch.github.io/group__pytho...gress.html

edit:
it is DialogProgress im talking about
Reply
#5
(2023-05-07, 14:52)burekas Wrote: @jepsizofye
Yes, this is what I want. (Not the DialogProgress)
How to do it?

I am not aware of anyway to update an open Notification.  You could close it and reopen a new one with the new message but Kodi doesn't offer a Notification close() method, that I am aware of.  That might be a good feature request.  You can send multiple Notification messages and Kodi will display them one after another but again, with the Notification being timer based vs. event based it can be hard to control.


Thanks,

jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#6
@jbinkley60

But I know that in the past there were some addons that do this.
It doesn't seem to be a new notification every time, it's the same one when the data is updating.

So how the did that?

* And someone can, please move this to the "Developement->Addons" section. Thanks.
Reply
#7
EDIT:
So yes, if notifications are shown one by other quickly, it looks like it is static and updating.
Reply
#8
(2023-05-07, 20:10)burekas Wrote: EDIT:
So yes, if notifications are shown one by other quickly, it looks like it is static and updating.

The only way I can think to do this is put it only a timer loop, say 1 second and have the notification timer be 1000.  Then just update the message (if needed) and it will be displayed the next time through the loop. It's an option, albeit a clunky one.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#9
You are looking for DialogProgressBG.
https://xbmc.github.io/docs.kodi.tv/mast...s_b_g.html

Note the "BG" for background, this class doesn't block the rest of the GUI. Skins tend to design this similar to their notifications, but that is not a requirement.
Reply
#10
(2023-05-08, 16:27)rmrector Wrote: You are looking for DialogProgressBG.
https://xbmc.github.io/docs.kodi.tv/mast...s_b_g.html

Note the "BG" for background, this class doesn't block the rest of the GUI. Skins tend to design this similar to their notifications, but that is not a requirement.

Can this class be moved to a corner of the screen or is it in the middle like the other Dialog Class windows ?  Notifications are nice in that they are in the corner. 


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#11
Skins decide where it displays on screen, like all dialogs and everything else. It is a non-interactive dialog with no buttons or other actions, so generally skins don't put it in the middle of the screen. It is the same dialog that Kodi shows when updating music and video libraries in the background.
Reply

Logout Mark Read Team Forum Stats Members Help
How to update a built-in Notification while it is open?0