title: really confused with setPreviewCallback in Android, need advice
body: <p>I'm building an application on Android to take frames from the camera, process them, and then display the frame on a surfaceView, as well as drawing on the SurfaceView via the canvas and drawbitmap and all.</p>
  
  <p>Just to check, is SurfaceView and Bitmaps and Canvases the best way to do it ? I'm after speed.</p>
  
  <p>Assuming the answer to the above is Yes, the question would be: Where should I place the following function</p>
  
  <pre><code>camera_object.setPreviewCallback(new PreviewCallback()
       public void onPreviewFrame(byte[] data, Camera camera){
  </code></pre>
  
  <p>should I place it in onCreate() or should I place it in surfaceCreated() or surfaceChanged() ?</p>
  
  <p>I declared my mainactivity class as follows:</p>
  
  <pre><code>public class MainActivity extends Activity implements SurfaceHolder.Callback, Camera.PreviewCallback
  {
  </code></pre>
  
  <p>and in that class Eclipse forces me to create an override function for onpreviewframe in the MainActivity class as follows</p>
  
  <pre><code>public void onPreviewFrame(byte[] data, Camera camera){
  }
  </code></pre>
  
  <p>but it never gets called. Should I try to use this function ? is it better to use it ? or is it just an Eclipse thing ?</p>
  
  <p>Please advise</p>