Apps-for-Android gets 3 new code samples: graphics & download

September 11, 2008
0

Android developer Jack Palevich has released three new open-source samples on the official project blog, two giving insight on how best to implement the OpenGL ES 3D graphics APIs, while the last is an example of a downloader.  Triangle is, according to Palevich, the "Hello World" of OpenGL ES apps, and is a simple use of the GLView class and the OpenGL ES 3D library in creating a spinning, textured triangle.

SpriteText adds to that, with the inclusion of screen-aligned text:

"SpriteText contains a reusable LabelMaker class for drawing static text and screen-aligned images, as well as a Projector class for finding the 2D screen coordinates corresponding to a 3D point, and a MatrixTrackingGL class for keeping track of the current transformation matrix. Finally, it shows how to use these classes to display a milliseconds per frame counter. A ms/f counter can be helpful for tuning graphics performance" Jack Palevich, Android Developers Blog

Finally, Downloader is an example of a file download system that could be added to the start of any new Android app.  It automatically downloads any number of files from an XML configuration document stored on a named web server, and would be useful in situations where there is more local data than can fit into an .apk file.

The code is available to download and experiment with now.  Click to discuss now in Android Community.


Recent Stories