android: URI in actionable notifications is not working when application open
Home Assistant Android version: 1.7.2-137 (137) Android version: 10 Phone model: Pixel 4 XL Home Assistant version: 0.105.5 Last working Home Assistant release (if known): N/A Description of problem:
After updating to build 137 I can see several of the new notification enhancements. When I attempt to use uri in my actions nothing happens. Neither a normal URL, which was previously working (https://www.google.com/) or even a lovelace view /lovelace/settings load anything. The notification is just dismissed. When I use clickAction the lovelace view loads as expected. The relative camera URL is also working for image.
Example:
service: notify.mobile_app
message: test
data:
actions:
- action: test
title: test
uri: /lovelace/settings
I have also tried
uri: https://www.google.com
Traceback (if applicable):
N/A
Screenshot of problem:
No screenshot as the notification just dismisses without any action occurring.
Additional information:
The action event still get sent when the action is selected so seems to just be a URL loading issue.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (6 by maintainers)
@dshokouhi Good catch - I wasn’t aware that the current version I’m on doesn’t fully support that yet. However, from the looks of the other comments here, it doesn’t seem fully 100% working yet - but it would explain why it never works for me.
The other issue that I created (#473) is separate from this one however.
What @dshokouhi said is correct. That will create a button in the notification. If you want clicking on the notification to go to the
/lovelace/camerasview you need a click action, not actions:In order for the uri handling to happen you need to set the action to
URIExample: