home-assistant / home-assistant/android
Animated GIF Notification Not Working on Samsung (Android 14)
- Dominant language
- Kotlin
- Stars
- 3.9k
- Forks
- 1.1k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 81
Description
**Home Assistant Android app version(s):**
24.12.1-full
**Android version(s):**
Android 14 / OneUI 6.1
**Device model(s):**
Samsung Galaxy S24 (SM-S921U1)
**Home Assistant version:**
2024.12.5
**Last working Home Assistant release (if known):**
N/A
**Description of problem, include YAML if issue is related to notifications:**
### EDIT: Determined that animated Video type notifications are in fact working, as my initial test video was too short. GIF type notifications are the issue here. Thread title was updated to reflect this change.
I've been trying to setup an automation that sends a notification to an android device with an animated GIF or Video attachment using the _Send Notfication via Mobile App_ method. When sent, both the GIF and MP4 formats of a file will only show the first frame, instead of playing as an animated GIF in the notification shade. Through my reading, it seems the animated GIF support is very new as of Android 14, but the video support should be well established. I've attempted to follow the [Standard Attachments](https://companion.home-assistant.io/docs/notifications/notification-attachments) docs closely, and my configuration (of the GIF version) can be seen below. The video version simply replaces _image:_ with _video:_ and the _.gif_ with _.mp4_ extension (I have both files stored locally):
```
action: notify.mobile_app_s24_tugg
metadata: {}
data:
message: You've achieved your weekly eating goals! Great Job!
title: Nutrivore
data:
notification_icon: mdi:party-popper
color: "#8A2BE2"
channel: Nutrivore
importance: high
image: /media/local/spongebob-dancing.gif
clickAction: /lovelace/nutrivore
enabled: true
```
I've tried stripping this down to the bare essentials (removing channel, notification_icon, clickAction, ect) with no luck. I also tried using the web URL of the GIF source without success. The GIF and the video both correctly play from the "Media Player" folder in the Home Assistant frontend, so I feel the file and it's format are "correct" here. It feels like the companion app isn't even attempting to play the media, instead falling back to a thumbnail or static configuration, but I'm just guessing here.
**Companion App Logs:**
GIF Notification Log
```
12-27 08:56:34.421 13310 13310 D MessagingService: Creating notification with following data: {notification_icon=mdi:party-popper, color=#8A2BE2, image=/media/local/spongebob-dancing.gif, title=Nutrivore, webhook_id=256e4c3fb343c0644e6206dafcac6eef54653a8bf79b8741ec930ea7ca0e3367, channel=Nutrivore, clickAction=noAction, message=You've achieved your weekly eating goals! Great Job!, importance=high, server_id=2}
12-27 08:56:34.426 13310 13310 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: true, usesWifi is: true
12-27 08:56:34.426 13310 13310 D ServerConnectionInfo: Using internal URL
12-27 08:56:34.429 13310 13396 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: true, usesWifi is: true
12-27 08:56:34.429 13310 13396 D ServerConnectionInfo: Using internal URL
12-27 08:56:34.596 13310 13396 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: true, usesWifi is: true
12-27 08:56:34.596 13310 13396 D ServerConnectionInfo: Using internal URL
12-27 08:56:34.688 13310 13310 D MessagingService: Show notification with tag "null" and id "148206835"
12-27 08:56:34.689 13310 13310 I NotificationManager: io.homeassistant.companion.android: notify(148206835, null, Notification(channel=nutrivore shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x10 color=0xff8a2be2 vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)) as user
```
Video Notification Log
```
12-27 08:59:09.602 13310 13310 D MessagingService: Creating notification with following data: {notification_icon=mdi:party-popper, color=#8A2BE2, title=Nutrivore, video=/media/local/spongebob-dancing.mp4, webhook_id=256e4c3fb343c0644e6206dafcac6eef54653a8bf79b8741ec930ea7ca0e3367, channel=Nutrivore, clickAction=noAction, message=You've achieved your weekly eating goals! Great Job!, importance=high, server_id=2}
12-27 08:59:09.609 13310 13310 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: true, usesWifi is: true
12-27 08:59:09.609 13310 13310 D ServerConnectionInfo: Using internal URL
12-27 08:59:09.609 13310 13390 V MediaMetadataRetriever: constructor
12-27 08:59:09.616 13310 13390 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: true, usesWifi is: true
12-27 08:59:09.616 13310 13390 D ServerConnectionInfo: Using internal URL
12-27 08:59:09.674 13310 13390 V MediaMetadataRetriever: setDataSource(205, 0, 576460752303423487)
12-27 08:59:09.696 13310 13390 V MediaMetadataRetriever: setDataSource(fd) return(0)
12-27 08:59:09.697 13310 13390 V MediaMetadataRetriever: extractMetadata(9)
12-27 08:59:09.699 13310 13390 V MediaMetadataRetriever: getFrameAtTime: time(100000 us) option(3) colorFormat(4) metaOnly(0)
12-27 08:59:09.820 13310 13390 V MediaMetadataRetriever: destructor
12-27 08:59:09.820 13310 13390 V MediaMetadataRetriever: disconnect
12-27 08:59:09.821 13310 13310 D MessagingService: Found 1 frames for video notification
12-27 08:59:09.822 13310 13310 D MessagingService: Show notification with tag "null" and id "148362017"
12-27 08:59:09.823 13310 13310 I NotificationManager: io.homeassistant.companion.android: notify(148362017, null, Notification(channel=nutrivore shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x10 color=0xff8a2be2 vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)) as user
```
**Screenshot or video of problem:**


**Additional information:**
Contributor guide
Assessment
This issue has not been assessed yet.