Hati
Hati

Reputation: 111

Android Custom Notification with big animated gif image

I want to make a Custom Notification with big animated gif image. So I cannot find a solution resolve this problem. Because i can only use RemoteView to custome layout. Creating custom android notification without RemoteView

But RemoteView just support some basic view.
https://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout

How can i do this?

Upvotes: 7

Views: 2461

Answers (1)

Amir Hossein Mirzaei
Amir Hossein Mirzaei

Reputation: 2375

there is no good solution for this but you can use this trick :

you can set imageView to remoteView of your notification and than change the image of your imageView per gif frame and update your remoteView imageView image and your notification and you should do this on separate Thread because it is costly!

for splinting your gif to separate images you can try this sulutions :

splitting out side of your project :

https://ezgif.com/split

splitting inside your project and in runtime :

Split GIF into frames

please notify me if this solution worked for you

Upvotes: 4

Related Questions