Notification does not show contents in pop-up

I have been using openHAB and the Android app for quite some time now and it always worked without problems. Since the update to app version 2.4.0 (via Play Store) about one week ago, new notification pop-ups are no longer shown with their contents on my phone. Instead, the notification reads that there is/are 1 (2,3,…) new notifications from openHAB. Inside the app, in the notification area, the notification content is shown correctely. On all other Android phones/tablets, the notification pop-ups are correctly shown with the full content. (I also tested this with a fresh install from Google Play on a phone where the app had never been installed before.)

I did NOT have this problem with the previous official version. But downgrading to this version now, it also only shows pop-ups with “1 new notification”. Downgrading to 2.2.0, the notification pop-ups work correctly.
Sending notifications from myopenhab.org to the phone directly also only creates a pop-up with “1 new notification”, that can then not be shown, as it is not stored in the notification area.

I already tried removing and re-installing the app several times, of course with cleaning the app data & cache. Removing the device from myopenhab.org also did not fix the issue.

Google did not bring up any results for this behaviour so far.
This situation is very annoying, as I have to unlock the phone and open the openHAB app every time now, if I want to know what a new notification says.

Here are two screenshots:
Left: V 2.4.0 (german)
Right: What it looks like, when downgrading to V2.2.0

In the screenshots, I’m using Wifi, but cellular does not change the behaviour.

I’m having the same behavior. I guess it is related to the API level the app is running on. I’m on 6.0.1 and notifications are only summarized (one new…).

what android version are your devices on?

I’m running the same Android version: 6.0.1 on a Galaxy S5.

2.4.0 uses Notification groups (https://developer.android.com/guide/topics/ui/notifiers/notifications#bundle). Those are avaible for Android 7 and higher, but app seems to use them for Android 6 or higher: https://github.com/openhab/openhab-android/blob/master/mobile/src/full/java/org/openhab/habdroid/core/GcmMessageListenerService.java#L161
(Mapping between version name and code: https://en.wikipedia.org/wiki/Android_(operating_system)#Platform_usage)

Notifications work on my Android 5 tablet (showing each notification on their own) and on my Android 7 phone (showing one notification that can be expanded).

@maniac103 Your opinion on this?

Notification grouping is available since Lollipop (API 21): https://developer.android.com/reference/android/app/Notification.Builder.html#setGroupSummary(boolean)

If only the summary notification is shown, one should be able to expand it by swiping down on the notification with 2 fingers. @Schnulli87 does that work for you? By default in stock Android, the topmost notification is expanded by default, but I’m not sure about Samsung’s implementation.

Edit: or are you talking about a ‘locked phone’ scenario? There might be a setting under the lockscreen options whether to show sensitive content in lockscreen notifications. If that option is enabled, the OH app will only show the generic summary (‘x new notifications’) in the lockscreen.

In any case, I’ll give this a try on a API 23 (Android 6.0) emulator.

I think, to expand the summary, you only need one finger. At least, there is no reaction with two fingers. But trying to expand the summary only increases the notification height a little bit. The real content is not shown. This behaviour is independent of the phone being locked or unlocked, as I have Android set up to always show the content of notifications.

By the way, I tested today also with a Samsung S4 Mini on Android 4.4 and there, the notifications are shown correctely.

FWIW, I can reproduce the issue and will look into it. The strange thing is that the non-summary notifications seemingly aren’t present at all, which leads to ‘0 new notifications’ being shown when receiving the second notification.

BTW, @mueller-ma, the reason why summary is used on M+ only is that the method I use for fetching the already present notifications ( https://developer.android.com/reference/android/app/NotificationManager.html#getActiveNotifications() ) is API 23 only.

And another BTW: The actual reason for introducing the summary stuff was Android Wear support, so we can’t rip it out easily on M devices … but there surely must be something else that we’re missing.

After looking at it, the best idea is making the summary an API 24+ (Android 7.0 and higher) only thing. We could use InboxStyle for the summary on M (like email clients do it, multi-line expanded view), but since we don’t store any in-app information about the notifications, we have no in-app knowledge about the previous notifications and thus rely on fetching the previous notifications from NotificationManager … which doesn’t store non-summary notification info on M :frowning:
I’ll make a PR.

Release 2.5.1 includes maniac103’s PR and it fixes the issue for me :+1:

Perfect! Yes, the issue seems to be fixed with 2.5.1!
Thanks a lot for your fast work!

The fix is also included in 2.5.0, the latest stable release I published today. It’s not in the changelog for this version as it’s more a minor bug and the changelog for stable versions is shown in the Play Store. You receive the update to 2.5.0 this or next week.

2 Likes

Absolutely great stuff from the mobile app team!

thanx guys :slight_smile:

@mueller-ma

Having version 2.5.0 and “since a few days”, no pop-up notifications are shown.

They are shown inside “Openhab APP” and in myopenhab cloud. But there are no pop-up notifications anymore. Using Samsung Galaxy S5 Neo (SM-G903F), Android 6.0.1, latest available version).

It was running before without any problems. Did not knowingly change anything, most likely accidentally, but where?

EDIT: I found the mistake!!! It was a wrong setting in Android. Settings —> Notifications --> Openhab was set to: OFF.
I swear I didn’t set this intentional to OFF.