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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:28:17+00:00 2026-05-26T14:28:17+00:00

How do I stop the media recorder and go to another activity in android?

  • 0

How do I stop the media recorder and go to another activity in android? I have set setMaxduration in media recorder. How do I check if maxduration has been reached? I have to stop the media recorder and go to another activity.

Thanks

  • 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-05-26T14:28:18+00:00Added an answer on May 26, 2026 at 2:28 pm

    You may use the onInfo listener to listen for the event and then start the other activity.

    Use the following code snippet:

    mediaRecorder = new MediaRecorder(); 
    //... all your setup stuff ... 
    
    mediaRecorder.setOnInfoListener(new MediaRecorder.OnInfoListener(){ 
        @Override 
        public void onInfo(MediaRecorder mr, int what, int extra) { 
    
            if(what == MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED ) { 
               startActivity(new Intent(this.getApplicationContext(), ANOTHERACTIVITY.class)); 
            } 
        } 
    }); 
    

    Hope this helps!!

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

Sidebar

Related Questions

I have a very simple Activity to record audio using MediaRecorder . Basic start/stop
I have been trying to integrate my very simple voice recorder app with the
I have two activity: MediaPlayer_Activity (display the control like play,pause,stop,next....) MediaPlayerPlayList_Acitivty (to display all
i am creating media recorder demo application. for that i have take two button
I am trying to stop a media player and get out of my activity
Possible Duplicate: Android: How to stop media (mp3) in playing when specific milliseconds come?
I have an activity that is a service which plays audio using a media
Lots of keyboards have common media functions like next/previous, play/pause and stop. Do they
How do I stop a function/procedure in a superclass from been overridden in a
I'm new in Android development and I have the next question/problem. I'm playing around

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.