Hello Abhilash, could you be more specific about the exception? what kind of exception is the application throwing? have a nice day.
On Jan 11, 1:02 pm, Abhilash baddam <[email protected]> wrote: > any help... > > On Tue, Jan 11, 2011 at 8:45 PM, Abhilash baddam < > > > > > > > > [email protected]> wrote: > > Hi friends, > > > I am trying to record a voice but i am getting an > > exception..when the clicks on a button it will start recording and when he > > clicks on stop it's stops recording that is my idea and that recorded file > > will be stored in SDCard. But here i am getting IllegalStateException at > > recorder.start(); this line... > > > @Override > > public void onClick(View v) { > > if(v==rec) > > { > > recorder.setAudioSource(MediaRecorder.AudioSource.MIC); > > recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); > > recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT); > > recorder.setOutputFile("/sdcard"); > > try { > > recorder.prepare(); > > } catch (IllegalStateException e) { > > e.printStackTrace(); > > } catch (IOException e) { > > e.printStackTrace(); > > } > > try > > { > > recorder.start(); *//here iam getting exception* > > } > > catch(IllegalStateException e) > > { > > System.out.println("Exception...."+e.toString()); > > } > > } > > else if(v==stoprec) > > { > > recorder.stop(); > > recorder.release(); > > } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

