home-assistant / home-assistant/android

Video Gif attachment on Notifications not showing an icon

Open
#2,727 10 comments 0 reactions 0 assignees View on GitHub
bug notifications
Dominant language
Kotlin
Stars
3.9k
Forks
1.1k
Avg merge
1d 12h
Merged PRs (30d)
81

Description

**Home Assistant Android version:**
beta-2510-f9ceeb0d-full
**Android version:**
Android 12
**Phone model:**
Samsung S20+
**Home Assistant version:**
2022.7.7
**Last working Home Assistant release (if known):**
N/A

**Description of problem:**
When firing a notification with a video attachment, I don't get an icon showing up as per this screenshot:

![Screenshot 2022-07-29 at 14 50 30](https://user-images.githubusercontent.com/57415184/181774660-ecfa2c19-6505-413d-8db4-ad6c55f7402c.png)

Only when I pull down the notification to expand it, do I see the video gif:

![Screenshot 2022-07-29 at 14 50 55](https://user-images.githubusercontent.com/57415184/181774739-7b5fd2a8-d6d4-4f97-92e9-3ca938f22d9c.png)

If I add an extra 'image' field to the notification, I get a static icon/thumbnail:

![Screenshot 2022-07-29 at 14 52 08](https://user-images.githubusercontent.com/57415184/181774968-3eb99381-225a-4c64-bb23-4f38f2865153.png)

But then when I expand the notification, the desirable main gif is smaller and pushed to the left while the image stays in the top right corner of the notification:

![Screenshot 2022-07-29 at 14 52 19](https://user-images.githubusercontent.com/57415184/181775000-62a0a420-5417-4d5f-9bb1-6a32694ec54f.png)

My proposed solution is that the video gif displays the same way regular images do on notifications, with an icon displayed which fades away when you pull down the notification to expand it. Even if this icon image cannot be dynamic, is there a way it can pull a static image from the gif?

**Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):**

```
N/A
```

**Additional information:**

Code with extra 'image' field added to force display an icon:
```
service: notify.mobile_app_ss
data:
title: Doorbell Pressed
message: Someone is at the door
data:
image: /local/snapshots/amcrest_snapshot.jpg
video: "http://192.168.X.X:5000//api/events/XXXXXXX.015244-bk6sxl/clip.mp4"
ttl: 0
priority: high
tag: doorbell-pressed
notification_icon: mdi:doorbell-video
channel: Doorbell Press
actions:
- action: BINS_OUT
title: Leave at door
- action: BINS_OUT
title: Put in bin

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.