Permanent pop-up notification?

I get a notification from HA on my Android phone, with a camera still attached, when someone presses my doorbell. Is there any way that I can get that notification to pop-up on top of whatever is on the screen (even when the phone is locked), rather than having to hunt for it in the notification list?
I’m running HA 2022.2 Core.

Yes you need to adjust the notification channel setting to pop-up on screen.

Which channel would I need to specify to have the notification pop up, even if the screen is locked?

whichever channel the notification is sent to, if unset then it is the General channel.

I haven’t specified a channel up to now, but I have just tried setting it to “General”. The notification does not “pop up” on the phone - it just sits in the notification tray- and I need to unlock the phone to see it.
This is the code that I’m using:

alias: send_camera_snapshot
sequence:
  - service: camera.snapshot
    data:
      filename: /config/www/{{ camera_id }}_snapshot.jpg
    target:
      entity_id: camera.{{ camera_id }}
  - service: notify.mobile_app_moto_g_5g_plus
    data:
      message: "{{ camera_id }} alarm"
      title: Alarm triggered
      data:
        image: /local/{{ camera_id }}_snapshot.jpg
        channel: General
        importance: high
        visibility: public
        actions:
          - action: URI
            title: Open Image
            uri: >-
              https://mydomain:8123/local/{{ camera_id
              }}_snapshot.jpg
mode: single

I think you misunderstood me. You need to physically change the notification channel settings on your device for the channel being used. The default channel when not set is General so there is no need to set it to General if you don’t plan on changing it to a different channel. You also need to change the default settings a channel has, it wont just work by defining the channel.

Settings > Companion App > Notification Channels and edit the channel being used and from there you will an option to pop-up on screen. Notification channels are a system setting and not an app setting. The app just makes it easier to find.

1 Like

Ah OK I have found those settings. The General channel has the “Pop on screen” option enabled, but (a) it doesn’t pop on the screen if the screen is locked, and (b) the pop-up disappears after a couple of seconds - I was hoping to make it permanent (until I swiped it away).

different devices will have different behavior based on that setting, are you looking for behavior similar to a phone call or alarm?

That is currently not supported but it sounds like you are asking the app to implement https://developer.android.com/develop/ui/views/notifications/build-notification#urgent-message

Yes, that’s the sort of thing I was hoping for. For example, I use an app called NextSMS which pops any new text message onto my screen, on top of any other apps. This is what I really want the HA doorbell notification to do.
So I guess it’s not possible?

not currently possible but feel free to submit a feature request

Thanks - have just submitted a feature request

Hi dshokouhi,
I have setup the to my android tablet (lenovo M10) and it is receiving the notification, however not as pop up, when looking in the notification channel, I do not see an option for popup?
Is this due to the tablet behavior? If so, does that mean that I can never get a popup on a Lenovo?

what options do you see for the channel? some devices may opt to take importance into account but not sure the wording may be different per manufacturer.

I only see:
Sound
Vibrate
Show notification dot
Override Do not disturb
The tablet is only running Android 10 and cannot be upgraded apparently - if thats the issue?

no i dont think the OS version will make a difference there, channels have been around since android 8

can you try sending another notification to a new channel with importance set to high ?

https://companion.home-assistant.io/docs/notifications/notifications-basic/#notification-channel-importance

the reason why I say a new channel name is because some settings can only be set the first time the channel is created so good to make sure we are not using a lower default value which will not pop on the screen.

Okay when I set the importance to high with a new name the pop up comes up in the display, however in the app there still is no option for Pop up?
Continued to test,

  • if I take out the high importance no pop up on the screen any longer even if I switch back to high importance
  • I had to set it to a different name to get the pop up to appear in the screen again, which worked okay until I went into the companion app “Notification Channels” to see if there was a pop up option, no option and when I came out of the config the pop ups stopped on the screen again.

sounds like you may need to set a unique name and just dont touch/visit the page…strange behavior.

:slight_smile: yeah strange,
another question - the pop up disappears after some seconds, is there a way of making it stay on the screen until I have acted upon it?