1

I'm building an app similar to Facebook Messenger on Android and I would like to display a GIF as the chat head/bubble. I know the chat head operates as a service and found a way to display GIFs on activities (http://android-er.blogspot.ca/2014/03/play-animated-gif-with.html), but can't get it to work for a service.

Separate, but likely related issue: I'd also like to display GIFs in the popup window (after the chat head is opened).

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

1 Answers1

2

Android actually can decode and display animated GIFs, using android.graphics.Movie class.

This is not too much documented, but is in SDK Reference. Moreover, it is used in Samples in ApiDemos in BitmapDecode example with some animated flag.

Find here: https://stackoverflow.com/a/7772170/3626214

Community
  • 1
  • 1
Aspicas
  • 4,498
  • 4
  • 30
  • 53
  • but with this solution you have to turn of hardware acceleration which makes the app laggy when using something like view pager. – dangalg May 05 '15 at 06:25