Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 842265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:55:53+00:00 2026-05-15T05:55:53+00:00

I’m new in Android development and I have the next question/problem. I’m playing around

  • 0

I’m new in Android development and I have the next question/problem.

I’m playing around with the MediaRecorder class to record just audio from the microphone. I’m following the steps indicated in the official site: http://developer.android.com/reference/android/media/MediaRecorder.html

So I have a method that initializes and configure the MediaRecorder object in order to start recording. Here you have the code:


        //initializes audio recorder
        MediaRecorder mrecorder = new MediaRecorder();
        //configure the input sources
        mrecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
        //set the output format
        mrecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
        //set the audio encoding
        mrecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
        //specify the output file
        mrecorder.setOutputFile("/sdcard/test.3gp");
        //prepare for recording
        try {
            mrecorder.prepare();
        } catch (IllegalStateException e) { 
            e.printStackTrace();
            Log.d("Syso". e.toString());
        } catch (IOException e) { 
            e.printStackTrace();
            Log.d("Syso". e.toString());
        }

When I execute this code in the simulator, thanks to logcat, I can see that the method prepare() gives an exception when is called:


java.io.FileNotFoundException: /sdcard/test.3gp (Permission denied)

And I have no idea why this is happening. Due to the message of the exception, I’ve given permissions in the manifest to access to storage by adding the following line to the xml:


<uses-permission android:name="android.permission.STORAGE" />

But this doesn’t fix anything and I still get the same exception all the time. The SDCard is mounted according to the emulator, so I have no clue.

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T05:55:54+00:00Added an answer on May 15, 2026 at 5:55 am

    Add the WRITE_EXTERNAL_STORAGE permission to AndroidManifest.xml.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.