Starting video capture on one click in android
<p>I want to start camera and also to automatically start recording just by clicking an app in android. I have the code to start the camera but I do not know how to start auto capture of the video. Please help.
the code I have for launching camera- </p>

<pre><code>@Override 
protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState); 
   setContentView(R.layout.activity_c1_main);
   Intent intent = new Intent("android.media.action.VIDEO_CAPTURE");
   StartActivityForResult(intent,CAPTURE_VIDEO_ACTIVITY);
}
</code></pre>

<p>I found about view.performclick but do not know how to use for camera</p>
