start failed error using mediaRecorder on android
<p>I want recording on glsurfaceview android.</p>

<pre><code>private GLSurfaceView glview;
private Button start;
private Button stop;
private MediaRecorder mediaRecorder;
@Override
public void onClick(View v) {
   if ( v == start) {
        mediaRecorder = new MediaRecorder();
        mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
        mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
        mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);
        mediaRecorder.setVideoSize(176, 144);
        mediaRecorder.setVideoFrameRate(20);
        mediaRecorder.setPreviewDisplay(glview.getHolder().getSurface());
        mediaRecorder.setOutputFile("/sdcard/test001111.mp4");

        try {
            mediaRecorder.prepare();
            mediaRecorder.start();    //occur exception
        } catch (IllegalStateException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

        if (v == stop) {
            if (mediaRecorder != null) {
                mediaRecorder.stop();
                mediaRecorder.release();
                mediaRecorder = null;
            }
        }
    }
}
</code></pre>

<p>I try search, but only recording on surfaceview example.</p>

<p>I want <code>GLSurfaceView</code> </p>

<p>when I start click button, occur exception. </p>

<p>and my logcat</p>

<pre><code>java.lang.RuntimeException: start failed.
   at android.media.MediaRecorder.native_start(Native Method)
   at android.media.MediaRecorder.start(MediaRecorder.java:726)
   at com.example.unno.mywebrtc.MainActivity$TestVideoListener.onClick(MainActivity.java:134)
   at android.view.View.performClick(View.java:4101)
   at android.view.View$PerformClick.run(View.java:17080)
   at android.os.Handler.handleCallback(Handler.java:615)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:4863)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
   at dalvik.system.NativeStart.main(Native Method)
</code></pre>

<p>how to recording on glsurfaceview?</p>

<p>thanks.</p>

<p>@update</p>

<p>manifest</p>

<pre><code>  &lt;uses-feature android:name="android.hardware.camera" /&gt;
&lt;uses-feature android:name="android.hardware.camera.autofocus" /&gt;
&lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt;

&lt;uses-permission android:name="android.permission.CAMERA" /&gt;
&lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
&lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
&lt;uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /&gt;
&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt;
</code></pre>