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 9216869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:30:38+00:00 2026-06-18T02:30:38+00:00

i am using the Media class to record from device mic, is sucessful recorded

  • 0

i am using the Media class to record from device mic, is sucessful recorded but i can’t find the audio file(myrecording.amr) on my android device.

function recordAudio() {
    var src = "myrecording.amr";
    var mediaRec = new Media(src, onSuccess, onError);
    // Record audio
    mediaRec.startRecord();
    // Stop recording after 10 sec
    var recTime = 0;
    var recInterval = setInterval(function() {
        recTime = recTime + 1;
        setAudioPosition(recTime + " sec");
        if (recTime >= 10) {
            clearInterval(recInterval);
            mediaRec.stopRecord();
        }
    }, 1000);
}

function onDeviceReady() {
    app.enabled("btnRecord", true);//IDE widget

}
// onSuccess Callback
//
function onSuccess() {
    app.alert("recordAudio():Audio Success");//IDE widget
    //app.setValue("labelmobile1", mediaRec.); IDE widget
}

// onError Callback 
//
function onError(error) {
    alert('code: '    + error.code    + '\n' + 
          'message: ' + error.message + '\n');
}

// Set audio position
// 
function setAudioPosition(position) {
    app.setValue("label1", position);//IDE widget
}

Where i can find it?

  • 1 1 Answer
  • 0 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-06-18T02:30:40+00:00Added an answer on June 18, 2026 at 2:30 am

    Try this

    var filepath = Environment.getExternalStorageDirectory().getPath();     
    File file = new File(filepath,<directoryName>);        
    var src=file.getAbsolutePath()+""myrecording.amr"     
    

    Your file will be created inside <directoryName>

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

Sidebar

Related Questions

I'm using MediaRecorder class to record an audio file and I used final String
I am using the Media Player Framework to play an audio stream from the
I am using media player to play a mp3 file.But when i run it,i
I try to record video using MediaRecorder Class. However I find out that I
I am trying to run a mp3 file using media player.It compiles fine,but it
I currently use AudioRecord to record audio in from the mic of an Android
I am trying out the record outgoing call using mic written this code but
I'm trying to create a custom audio effect by extending from the class android.media.audiofx.AudioEffect
I am using media player to play audio and video. I am creating own
I'm trying to run a mp3 file using android media player. I'm using this

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.