Mobile App Notifications Are Slow (Android)

This is not a complaint just a genuine request for information.

Recently my mobile notifications seem to be very slow to arrive. It can be several minutes, sometimes longer.

Where is the delay likely to be incurred and is there anything that can be changed at my end to improve it (I suspect not)

Thanks.

I use code like this:

service: notify.mobile_app_geoff_s_s21
data:
  data:
    ttl: 0
    priority: high
    push:
      sound:
        name: default
        critical: 1
        volume: 1
  message: Blah Blah
  title: Blah Blah

This delivers the notification immediately. What are you using?

1 Like

this does nothing on Android FYI, these elements are for iOS only. The rest is ok. ttl and priority is whats needed to speed up delivery of the notification

https://companion.home-assistant.io/docs/notifications/critical-notifications#android

2 Likes

Thanks, I haven’t been using critical but it seems like it is a sensible default.

I can’t find any documentation on what ttl is except that it goes with critical.

And @templeton_nash thanks for your reply, I was just replying to you when dshokouhi clarified a few things!


@dshokouhi Also, off topic but I don’t want to start a new post for documentation as they can become a little heated if people start piling in.

The mobile app docs are very good, some of the best in HA but is there any chance that a reference list of every possible option/command could be added somewhere?

I have noticed a slowdown of Android Companian App notifications as well. Just yesterday I received a camera alert 15 minutes after the Fedex guy left. It used to be within seconds. It does not happen all the time, but it happens more often now. Seems like something in 2023.9.x may have caused something to change. Not saying that is what happened, but I never noticed it before.

Can’t figure out for the life of me what is causing it.

Scott

did you make sure to follow the critical notifiation format mentioned and linked above?

we do have a feature overview showing a table of each feature https://companion.home-assistant.io/docs/core/

Its not easy to include a full list of references as not all elements can be added together. For example channel configuration is a one time setting that cannot be changed for the channel after it has been set. So including that in a reference list won’t make much sense and we need to be mindful of shared features with iOS.

Not yet. I am going to try that. However, as it worked before, maybe something in the new release tweaked or broke that portion of the notifications.

1 Like

Probably a month or two ago, I noticed that my Android notifications started being more delayed than before. I assumed it was a change with how Android handles things (I’ve got a Pixel, so I’m always on the latest and greatest), but I really have no idea. This is what I now use for critical notifications:

data:
  message: xxxxx
  title: xxxxxx
  data:
    importance: high
    ttl: 0
    priority: high
    car_ui: true

I used to just use the importance set to high (the docs seem confusing on which setting REALLY affects getting the notification ASAP) for my critical notifications, but even they became pretty delayed. After adding the ttl and priority settings, my critical notifications seem to pretty much be instantaneous again. I’ve also started adding the car_ui as well to make sure I can see them when using Android Auto.

no thats a placebo the docs linked above have existed for quite some time. Its all about how your Android device deals with doze, the app does not partake in that logic outside of the settings mentioned in the link.

This is not a setting that can be changed once set for a channel

https://companion.home-assistant.io/docs/notifications/notifications-basic#specific-channel-properties

we try to make that clear in the link above with the exact example to use

now for car_ui one thing to keep in mind is that the Notification Channel setting in your device needs to be set to “pop-up on device” in order to show up as a pop-up otherwise it will appear silently in the notification list in the car.

Good to know! I don’t drive terribly often and just assumed I missed the notification popping up. I’ve gone in and set this true for all my channels now.

Having re-read the docs, I still don’t have a good understanding of how setting the channel importance compares to the ttl and priority settings. I get that they’re different, but do they effectively do the same thing (just on a per channel basis versus not)? Not a big deal as I’ve just started adding it all to my critical notifications (which I think all have a dedicated channel in my case as well).

no they don’t importance has to do with the behavior of the notification, does it make a sound or even appear in the status bar. We do link to the official android docs in that step which calls out the specific behavior linked to the set importance

https://developer.android.com/develop/ui/views/notifications/channels#importance

High for example will only make a sound and not do a pop-up

Thanks for clarifying.

1 Like

Any further updates on this I’ve seen multiple reports of this across GitHub and various different forums all sorts of different voodoo to combat it. The most common seems to be to force close the app. That doesn’t seem to consistently work for me. It has apparently gotten worse since I’ve started utilizing more notifications and specifically actionable notifications.

In my case this is not a doze function of insured that my app is allowed to run without any optimization battery management or the like but gotten to the point where the notifications will come 30 seconds to several minutes late where as they used to be instantaneous

You should’ve followed the 3rd post instead of skipping it.

i have seen all of that. this does nothing additional to fix the delay in the notifications. i have done all of this. the issue is unlike any other android app out of the box, this app does not push notifications in real time. they get cached somewhere and come in clusters. I assume it is some attempt to minimize battery life or not get put to sleep by the OS but it is a big issue. so much that i’m lookiung at other ways to get notifications but I have several that are actionable and I’d like to not have to recreate.

i have done both high prioity/ttl and also notification channels and nothing has imporved the behavvior. i have excluded the app from any sleep/snooze/doze functions on my phone as well

please share the YAML example you used, it may not be correct.

for which? i have 30+ automations, 15-20 of them have notifications, some are actionable some are not, they all behave the same. If phone is in pocket, screen off, rarely get a notification. If screen on or just turned off in last 2-3mins then notifications are immediate.

Setup a test notification the other day with a simple pushbutton trigger, one with notificatokn channels, high-priority, ttl and one with simple notification through the visual guide and they both behaved the same-as above .

So what would you like me to send? Whatsapp, telegram, signal, or any app with push notifications alerts me immediately it is only this app that has the issue.

any of the important ones you want immediately. just pick one.

Edit: please make sure it includes the usage of the link I previously mentioned.

service: notify.mobile_app_shawn_cell
data:
  message: Garage Motion
  data:
    importance: high
    ttl: 0
    Priority: high
    car_ui: true
    channel: ha_notifications
    vibrationPattern: 100, 1000, 100, 1000, 100

what device is this?