Notifications and icons

I have two OH 5.1.2 installations, one on a Debian 13 VM and the other on a (Rockpi 4B+ running Armbian Linux 6.18.9-current-rockchip64).

I also have two smartphones for testing, a Motorola and a Samsung (both android), connected to myopenhab.

In any test scenario, the icon only appears along with the notification if a notification occurs beforehand and within a few minutes of each other.

I first noticed this after I started sending notifications from the alarm system I developed.

A notification occurs at the end of the night when the alarm is activated and a notification in the morning when the alarm is deactivated.

In these cases, I only receive the notification, but without the icon because several hours pass between each notification being sent.

Another scenario is when a power outage occurs, and I only receive the notification + icon when the power returns a few seconds/minutes after the outage.

If the power returns after several minutes or hours (as was the case with the last storm), I only receive the notification that the power has been restored, but without the icon.

Example of sending a notification:

actions.notificationBuilder(‘Test icon’).withIcon(‘oh:soundvolume’).withOnClickAction(‘ui:navigate:’ + ‘/overview/’).send()

It seems that some part of the notification function “sleeps” and only returns to normal operation when it is woken up.

There is no information in the LOG regarding errors or warns.

Has anyone else noticed this behavior?

Even after updating to OH version 5.1.3, the icons still only appear after a previous notification has been sent.

They continue to appear in subsequent notifications, as long as there isn’t a very long time between them.

If anyone else could test this, it would be very helpful.

Just copy the small example I already left in the previous message, send the notification and check if the icon appears.

Then, send the next notification within a few seconds and see if the icon appears this time.

Thank you.

This sounds like an issue with the Android app. My guess is that some battery saver is preventing the app from running in the background when a notification is received OR downloading the icon needs too long.

However all icons should be cached. When you open the notification list in the app all icons should be downloaded. Can you check this?

1 Like

Hi @mueller-ma !

Yes, all the icons appear in the notifications list.