Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support showing all frames of animated gif image in Android 14+ #4284

Merged
merged 4 commits into from
Mar 23, 2024

Conversation

NickM-27
Copy link
Contributor

@NickM-27 NickM-27 commented Mar 20, 2024

Summary

This adds support for saving a gif that is sent as a notification image locally so that it can be loaded using a content uri which enables the notification to show the gif as animated including all frames.

Should be noted that this only is only supported on Android 14+, for previous versions the behavior and handling will remain the same where only the first frame of the gif is shown.

Screenshots

demo.mov

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#1047

Any other notes

closes #1270

@dshokouhi
Copy link
Member

I think we will need a minor docs change for this as we currently mention GIFs are not animated :)

https://companion.home-assistant.io/docs/notifications/notification-attachments

GIF will not be animated in notification shade

GIF filetype will not be animated in notification shade

yup we have 2 on the same page 😅

@NickM-27
Copy link
Contributor Author

Yeah I was wondering about that, sounds good I will create that and link it up

Copy link
Member

@dshokouhi dshokouhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works well! Thank you for your contribution!

@NickM-27
Copy link
Contributor Author

@jpelgrom I see what you mean, what is your suggestion to handle this? We could extend the cutoff to 24 hours assuming no notifications will be kept that long

@jpelgrom
Copy link
Member

Extending the cutoff to 24-48 hours seems acceptable enough to me while still keeping storage use to a minimum.

@JBassett JBassett merged commit ef6327f into home-assistant:master Mar 23, 2024
4 checks passed
@NickM-27 NickM-27 deleted the gif-notifications branch March 23, 2024 13:57
@NickM-27
Copy link
Contributor Author

@dshokouhi just curious, is there a way to access the apks that are automatically generated or just need to wait for weekly release on github?

@dshokouhi
Copy link
Member

@dshokouhi just curious, is there a way to access the apks that are automatically generated or just need to wait for weekly release on github?

any action taht pushes to master will contain the latest APK now like https://github.com/home-assistant/android/actions/runs/8402417849 in the artifact

@NickM-27
Copy link
Contributor Author

awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notifications: GIFs only rendering the first frame
4 participants