android mediarecorder setting
<p>hey there i am trying to create and front facing recording app i have created the code and its running fine on my galaxy s but when i ran the same code on tablet screen get stuck whenever i start reecording i think there is some problem with parameters of media recorder bcaz when i commented mediarecorder.setvideosize() app works on tablet but it recrods for 10 seconds only. dont know wat could be the actual problem plz suggest </p>

<pre><code>    public boolean startRecording() throws IOException{
        try {
            camera.unlock();

            //mediaRecorder.release();
            mediaRecorder = new MediaRecorder();

            mediaRecorder.reset();
            mediaRecorder.setCamera(camera);
            mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
            mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
//CamcorderProfile.get(CameraProfile.QUALITY_LOW).videoFrameHeight
            mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
            mediaRecorder.setVideoSize(CamcorderProfile.get(CamcorderProfile.QUALITY_LOW).videoFrameWidth, CamcorderProfile.get(CamcorderProfile.QUALITY_LOW).videoFrameHeight);
        //  mediaRecorder.setMaxDuration(maxDurationInMs);
            File externalStorage = Environment.getRootDirectory();
            File r=getDir("videos", MODE_PRIVATE);
            File tempFile = new File(r.getAbsolutePath(),"haris.3gp");
            tempFile.createNewFile();
            mediaRecorder.setVideoFrameRate(videoFramesPerSecond);
            mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
            mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263);
            mediaRecorder.setOutputFile(tempFile.getPath());
           // mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
            mediaRecorder.setPreviewDisplay(surfaceHolder.getSurface());
            //mediaRecorder.setCamera(camera);
            mediaRecorder.setMaxFileSize(maxFileSizeInBytes);
            //Toast.makeText(getApplicationContext(), "file stored1 ", Toast.LENGTH_LONG).show();
            //camera.unlock();
                       try{
                           mediaRecorder.prepare();
                       }catch (Exception e) {
                        // TODO: handle exception
                          // Toast.makeText(getApplicationContext(), "status  "+ e.getMessage().toString(), Toast.LENGTH_LONG).show();
                    }
                       // Toast.makeText(getApplicationContext(), "file stored4444  ", Toast.LENGTH_LONG).show();


                                //camera.lock();

                            try{    mediaRecorder.start();

                            }catch (Exception e) {
                                // TODO: handle exception
                                Toast.makeText(getApplicationContext(), e.getMessage().toString(), Toast.LENGTH_LONG).show();


            }
</code></pre>
