I coded an android application which is measuring heart rate from camera input. I needed to desing an ECG animation to the application. I know that ECG isn\'t related. But I\'ll
It depends how real-time you need your data. If a lower framerate is sufficient, then I would recommended subclassing the View
class and overriding the onDraw
method. From there you can draw directly onto the canvas. Just make sure to call invalidate
on the view after your data changes to make sure onDraw
gets called.
If a faster framerate is required, then you probably want to use a SurfaceView
. Google has a Lunar Lander example that does a good job of that. But note some bugs have been found in the example, so use it as a guide not as law.
Lunar Lander: http://developer.android.com/resources/samples/LunarLander/index.html