Hi, Nico.
Thanks for the post. I did that in my checkStorage() method and it
returns the path i am using. Any other thoughts?
Andrew

On Aug 4, 2:03 am, Nico Balestra <nicobales...@gmail.com> wrote:
> Hi,
> you should do
>
> String name = Environment.getExternalStorageDirectory().getAbsolutePath() +
> "/Logger";
>
> to get the right mount point for your sd card.
>
> Hope this helps.
>
> Nico
>
> 2011/8/4 Ab Caballero <a...@mac.com>
>
>
>
> > I'm trying to provide an audio recorder within an application for the
> > user to dictate notes. I keep getting an error that there is no valid
> > output file and that the external storage is not available (I know it
> > is because i am using it in a separate activity). Any thoughts would
> > be appreciated.
>
> > private void recordAudio(){
> >                MediaRecorder recorder = new MediaRecorder();
> >                recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
>
> >  recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
> >                recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
> >                checkStorage();
> >                recorder.setOutputFile("/sdcard/Logger");
> >                try {
> >                        recorder.prepare();
> >                }
> >                catch (IllegalStateException e) {
> >                        // TODO Auto-generated catch block
> >                        e.printStackTrace();
> >                }
> >                catch (IOException e) {
> >                        // TODO Auto-generated catch block
> >                        e.printStackTrace();
> >                }
> >                recorder.start();   // Recording is now started
> >        }
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to