connectiq

Rendering an animated GIF in Garmin Connect IQ


According to the documentation (https://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/) the resource compiler supports GIF as Bitmap. However, when I display a GIF file, I just get a still picture, and the GIF doesn't move.

The GIF I have been testing with is this: http://bestanimations.com/Animals/Mammals/Cats/cats/cute-kitty-animated-gif-2.gif and I have saved the gif in the drawables folder (I use the ConnectIQ-plugin for Eclipse).

I have tried to include the Bitmap in the layouts resources as:

<layout id="MainLayout">
    <bitmap id="MotivatorCat" x="center" y="center" filename="../drawables/motivatorcat.gif"/>
</layout>

and I have tried to include it in the drawables resources as:

<drawables>
    <bitmap id="MotivatorCat" filename="motivatorcat.gif" />
</drawables>

and then loading it in initialize() by:

catgif = Ui.loadResource(Rez.Drawables.MotivatorCat);

and drawing it in onUpdate():

dc.drawBitmap(50, 50, catgif);

But nothing works.

What am I doing wrong?


Solution

  • The Connect IQ does not currently (as of SDK 2.1.x) support rendering of animated GIF images.