[G1 Android Development] djengizz:
The first version worked fine for me after downloading and opening it locally.

I think i found the code for Android 0.9 with the cylon boot animation. It has a third image and basically implements what i meant earlier with the array of images.

I'm a Java developer so i can read it pretty ok but i wouldn't be able to implement a nice solution.

bool BootAnimation::cylon()
{
// initialize the textures...
initTexture(&mLeftTrail, mAssets, "images/cylon_left.png");
initTexture(&mRightTrail, mAssets, "images/cylon_right.png");
initTexture(&mBrightSpot, mAssets, "images/cylon_dot.png");

int w = mWidth;
int h = mHeight;

const Point c(w/2 , h/2);
const GLint amplitude = 60;
const int scx = c.x - amplitude - mBrightSpot.w/2;
const int scy = c.y - mBrightSpot.h/2;
const int scw = amplitude*2 + mBrightSpot.w;
const int sch = mBrightSpot.h;
const Rect updateRect(scx, h-scy-sch, scx+scw, h-scy);

// erase screen
glDisable(GL_SCISSOR_TEST);
glClear(GL_COLOR_BUFFER_BIT);

eglSwapBuffers(mDisplay, mSurface);

glClear(GL_COLOR_BUFFER_BIT);

eglSwapRectangleANDROID(mDisplay, mSurface,
updateRect.left, updateRect.top,
updateRect.width(), updateRect.height());

glEnable(GL_SCISSOR_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);

// clear the screen to white
Point p;
float t = 0;
float alpha = 1.0f;
const nsecs_t startTime = systemTime();
nsecs_t fadeTime = 0;

do
{
// Set scissor in interesting area
glScissor(scx, scy, scw, sch);

// erase screen
glClear(GL_COLOR_BUFFER_BIT);

// compute wave
const float a = (t * 2*M_PI) - M_PI/2;
const float sn = sinf(a);
const float cs = cosf(a);
GLint x = GLint(amplitude * sn);
float derivative = cs;

glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);

if (derivative > 0) {
// vanishing trail...
p.x = (-amplitude + c.x) - mBrightSpot.w/2;
p.y = c.y-mLeftTrail.h/2;
float fade = 2.0f*(0.5f-t);
//fade *= fade;
glColor4f(fade, fade, fade, fade);
glBindTexture(GL_TEXTURE_2D, mLeftTrail.name);
glDrawTexiOES(p.x, p.y, 0, mLeftTrail.w, mLeftTrail.h);

// trail...
p.x = (x + c.x) - (mRightTrail.w + mBrightSpot.w/2) + 16;
p.y = c.y-mRightTrail.h/2;
fade = t<0.25f ? t*4.0f : 1.0f;
fade *= fade;
glColor4f(fade, fade, fade, fade);
glBindTexture(GL_TEXTURE_2D, mRightTrail.name);
glDrawTexiOES(p.x, p.y, 0, mRightTrail.w, mRightTrail.h);
} else {
// vanishing trail..
p.x = (amplitude + c.x) - (mRightTrail.w + mBrightSpot.w/2) + 16;
p.y = c.y-mRightTrail.h/2;
float fade = 2.0f*(0.5f-(t-0.5f));
//fade *= fade;
glColor4f(fade, fade, fade, fade);
glBindTexture(GL_TEXTURE_2D, mRightTrail.name);
glDrawTexiOES(p.x, p.y, 0, mRightTrail.w, mRightTrail.h);

// trail...
p.x = (x + c.x) - mBrightSpot.w/2;
p.y = c.y-mLeftTrail.h/2;
fade = t<0.5f+0.25f ? (t-0.5f)*4.0f : 1.0f;
fade *= fade;
glColor4f(fade, fade, fade, fade);
glBindTexture(GL_TEXTURE_2D, mLeftTrail.name);
glDrawTexiOES(p.x, p.y, 0, mLeftTrail.w, mLeftTrail.h);
}

const Point p( x + c.x-mBrightSpot.w/2, c.y-mBrightSpot.h/2 );
glBindTexture(GL_TEXTURE_2D, mBrightSpot.name);
glColor4f(1,0.5,0.5,1);
glDrawTexiOES(p.x, p.y, 0, mBrightSpot.w, mBrightSpot.h);

// update animation
nsecs_t time = systemTime() - startTime;
t = ((4.0f/(360.0f*us2ns(16667))) * time);
t = t - floorf(t);

eglSwapBuffers(mDisplay, mSurface);

if (exitPending()) {
if (fadeTime == 0) {
fadeTime = time;
}
time -= fadeTime;
alpha = 1.0f - ((float(time) * 6.0f) / float(s2ns(1)));

session()->openTransaction();
mFlingerSurface->setAlpha(alpha*alpha);
session()->closeTransaction();
}
} while (alpha > 0);

// cleanup
glFinish();
glDeleteTextures(1, &mLeftTrail.name);
glDeleteTextures(1, &mRightTrail.name);
glDeleteTextures(1, &mBrightSpot.name);
return false;
}

I think it depends on what exactly is supported by openGL if you can use a animated gif/png/whatever since we're looking at textures and not images. But i have no knowledge about openGL so i'm not sure.