javaandroidandroid-studiovoice-recording

How to record 5 sec of sound from mic and save it as file. java.Android studio


I am trying to voice record 5 sec after a button is click. Is there a ways to do it ? For example, when user clock on a button it starts recording 5 secs and stops. Whatever gets recorded should be saved in mp3 file. The file name is hard coded.

Thanks


Solution

  • Refer to Android Audio Capture documentation for recording audio and playing sound back.

    This is possibly a duplicate of How to Record Voice in android?