Home Coding Android Coding Build an Audio Capture App in Android

Build an Audio Capture App in Android

0

There are many ways to make use of an Android’s built-in microphone but the most convenable way is by using a class called MediaRecorder. This class is designed to record both video and audio. We will build an example app that will be able to capture audio and then play that recording using a MediaPlayer class. Note that in order to test your build successfully you’ll have to connect an actual android device, running it on an emulator won’t work.

1. Start a New Android Studio Project, name it and leave the default minimum SDK.

1

2. Choose an Empty Activity to get us started, leave the default activity name and hit Finish.

3. Insert the following code into MainActivity.java:

4. Modify the code in activity_main.xml to the following:

5. Insert the following code into AndroidManifest.xml :

6. These are the string resources I used:

7. If you managed to recreate my steps it should look like this:

Screenshot_2016-01-16-18-48-09Screenshot_2016-01-16-18-49-31Screenshot_2016-01-16-18-52-59

Denis Madroane App junkie, Android developer, proud Freelancer. Passionate about app development and blogging, updated with the new stuff. Likes to think that he's versed in app re-skinning, content writing and social media.

LEAVE YOUR COMMENT

Your email address will not be published. Required fields are marked *

Powered by WordPress