

{"id":76628,"date":"2020-03-04T09:52:31","date_gmt":"2020-03-04T04:22:31","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=76628"},"modified":"2021-08-25T14:04:35","modified_gmt":"2021-08-25T08:34:35","slug":"android-audio-manager","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/","title":{"rendered":"Android Audio Manager &#8211; Control the audio system of your android app"},"content":{"rendered":"<p>In this Android audio manager article, we will discuss two important things that are both related to the Audio System of an Android Device. The two topics that we are going to discuss are:<\/p>\n<ul>\n<li>Audio Manager<\/li>\n<li>Audio Capture<\/li>\n<\/ul>\n<p>Let us discuss these two topics one by one.<\/p>\n<h2>Android Audio Manager<\/h2>\n<p>Audio Manager in general plays and controls the volume and ring of a device. Audio Manager in android is a class that provides access to the volume and modes of the device. Android audio manager helps us adjust the volume and ringing modes of devices based on our requirements. The modes that are well known to us, that are Ringing, Vibration, Loud, Silent, etc. Android provides us with AudioManager class to provide control for them.<\/p>\n<p>Here, to make use of the <strong>AndroidManager<\/strong> class, we will first create its object. After we create an object, we can use <strong>setRingerMode<\/strong>.<\/p>\n<p>To create its object, we will call the <strong>getSystemService()<\/strong> method as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Private AudioManager myAM;\r\nmyAM = (AudioManager)getSystemService(Context.AUDIO_SERVICE);<\/pre>\n<p>To <strong>setRingerMode<\/strong> we will follow the following syntax:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">myAudioManager.serRingerMode(AudioManager.RINGER_MODE_SILENT);<\/pre>\n<h3>Android Audio Manager Modes<\/h3>\n<p>This method takes three types of parameters for each mode, the three modes are:<\/p>\n<ul>\n<li><strong>RINGER_MODE_NORMAL &#8211;<\/strong> This mode sets the device in general mode.<\/li>\n<li><strong>RINGER_MODE_VIBRATE &#8211;<\/strong> This mode sets the device at vibrate mode.<\/li>\n<li><strong>RINGER_MODE_SILENT &#8211;<\/strong> This mode sets the device at silent Mode.<\/li>\n<\/ul>\n<h3>Other Methods to Use Android Audio Manager<a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/android-audio-manager-methods.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-76689 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/android-audio-manager-methods.jpg\" alt=\"android audio manager methods\" width=\"600\" height=\"468\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/android-audio-manager-methods.jpg 600w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/android-audio-manager-methods-150x117.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/android-audio-manager-methods-300x234.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/android-audio-manager-methods-520x406.jpg 520w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/h3>\n<p>There are some more methods apart from <strong>setRingerMode<\/strong>, that we are enlisting below:<\/p>\n<ul>\n<li><strong>getRingerMode() &#8211;<\/strong> This method gets the current mode of the device.<\/li>\n<li><strong>getMode() &#8211;<\/strong> This method gets the current audio mode of the device.<\/li>\n<li><strong>getStreamVolume(int streamtype) &#8211;<\/strong> This method returns the current volume index for a certain stream of the device.<\/li>\n<li><strong>getStreamMaxVolume(int streamtype) &#8211;<\/strong> This method returns the maximum volume index for a certain stream of the device.<\/li>\n<li><strong>adjustVolume(int direction, int flags) &#8211;<\/strong> This method adjusts the volume of the most applicable stream of the device.<\/li>\n<li><strong>isMusicActive() &#8211;<\/strong> This method checks if there is some ongoing music or not.<\/li>\n<\/ul>\n<p>Now that, we have seen the AudioManager class of Android. We will proceed to learn Audio Capture.<\/p>\n<h3>Android Audio Capture<\/h3>\n<p>So, <a href=\"https:\/\/www.android.com\/intl\/en_in\/\">Android<\/a> comes with a built-in microphone through which we communicate over our phone. This microphone can help us capture audio, store it and play it in our devices. We do it with the help of the <strong>MediaRecorder<\/strong> class. This class is used to record Audio as well as Video in Android devices. To use this class, we need to create an object of this class. And after creating the object we would need to set the source, format and output file. To create the object and set the source and all, we will do the following:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">MediaRecorder myAR= new MediaRecorder(); \/\/instantiating its object\r\nmyAR.setAudioSource(MediaRecorder.AudioSource.MIC);\/\/Setting the source\r\nmyAR.set(MediaRecorder.OutputFormat.AMR_NB );\/\/Setting the Format\r\nmyAR.set(MediaRecorder.OutputFormat.THREE_GPP );\r\nmyAR.setOutputFile(outputFile );\/\/Setting the Output File<\/pre>\n<p>After we are done with it, we can start the recording using:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">myAR.start();<\/pre>\n<p>Apart from the <strong>start()<\/strong> method, there are some other methods of <strong>MediaRecorder<\/strong> class that are:<a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/methods-of-media-recorder-class.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-76690 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/methods-of-media-recorder-class.jpg\" alt=\"mediarecorder class methods\" width=\"530\" height=\"535\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/methods-of-media-recorder-class.jpg 530w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/methods-of-media-recorder-class-150x150.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/methods-of-media-recorder-class-297x300.jpg 297w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/methods-of-media-recorder-class-520x525.jpg 520w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/a><\/p>\n<ul>\n<li><strong>stop() &#8211;<\/strong> This method stops the recording.<\/li>\n<li><strong>release() &#8211;<\/strong> The need for this method is when a recorder instance is required.<\/li>\n<li><strong>prepare() &#8211;<\/strong> This method prepares the recorder before it starts.<\/li>\n<li><strong>setAudioSource() &#8211;<\/strong> This method sets the source from which the Audio is to be recorded.<\/li>\n<li><strong>setVideoSource() &#8211;<\/strong> This method sets the path for the Output File to be stored.<\/li>\n<li><strong>setOutputFormat() &#8211;<\/strong> This method sets the format for Output File.<\/li>\n<li><strong>setAudioEncoder() &#8211;<\/strong> This method sets the encoder for the audio.<\/li>\n<li><strong>setOutputFile() &#8211;<\/strong> This method sets the path for the Output File to be stored.<\/li>\n<\/ul>\n<p><em>Any doubts in DataFlair&#8217;s Android audio manager article till now? Ask in the comment section.<\/em><\/p>\n<h3>How to Implement Android AudioManager?<\/h3>\n<p>Now we will implement AudioManger in our <a href=\"https:\/\/data-flair.training\/blogs\/create-android-app\/\"><em><strong>application<\/strong><\/em><\/a> as follows:<\/p>\n<p><strong>Step 1:<\/strong> First of all we will create a new project and name it <strong>MyAudioManager<\/strong>.<\/p>\n<p>After that, we will open the <strong>activity_main.xml<\/strong> file and write the code below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;LinearLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n   android:layout_width=\"match_parent\"\r\n   android:layout_height=\"match_parent\"\r\n   android:orientation=\"vertical\"&gt;\r\n\r\n   &lt;TextView\r\n       android:id=\"@+id\/textView2\"\r\n       android:layout_width=\"wrap_content\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:layout_marginLeft=\"100dp\"\r\n       android:layout_marginTop=\"100dp\"\r\n       android:fontFamily=\"@font\/alfa_slab_one\"\r\n       android:text=\"DataFlair \"\r\n       android:textColor=\"#30148F\"\r\n       android:textSize=\"50dp\" \/&gt;\r\n\r\n   \/\/Define the buttons with their Id\r\n   &lt;Button\r\n       android:id=\"@+id\/button1\"\r\n       android:layout_width=\"150dp\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_marginLeft=\"130dp\"\r\n       android:layout_marginBottom=\"5dp\"\r\n       android:background=\"@color\/colorPrimary\"\r\n       android:text=\"Silent Mode\"\r\n       android:textColor=\"@color\/colorWhite\" \/&gt;\r\n\r\n   &lt;Button\r\n       android:id=\"@+id\/button2\"\r\n       android:layout_width=\"150dp\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_marginLeft=\"130dp\"\r\n       android:layout_marginTop=\"150dp\"\r\n       android:layout_marginBottom=\"5dp\"\r\n       android:background=\"@color\/colorPrimary\"\r\n       android:text=\"Ring Mode\"\r\n       android:textColor=\"@color\/colorWhite\" \/&gt;\r\n\r\n\r\n   &lt;Button\r\n       android:id=\"@+id\/button3\"\r\n       android:layout_width=\"150dp\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_marginLeft=\"130dp\"\r\n       android:background=\"@color\/colorPrimary\"\r\n       android:text=\"Vibrate Mode\"\r\n       android:textColor=\"@color\/colorWhite\" \/&gt;\r\n\r\n&lt;\/LinearLayout&gt;<\/pre>\n<p><strong>Step 2:<\/strong> Now we will write the code for <strong>MainActivity.java<\/strong> as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.DataFlair.myaudiomanager;\r\nimport android.app.Activity;\r\nimport android.content.Context;\r\nimport android.media.AudioManager;\r\nimport android.os.Bundle;\r\nimport android.view.View;\r\nimport android.widget.Button;\r\nimport android.widget.Toast;\r\n\r\n\r\npublic class MainActivity extends Activity {\r\n   Button ring, vibrate, silent;\r\n   private AudioManager myAudioManager;\r\n\r\n   \/\/ overriding onCreate\r\n   @Override\r\n   protected void onCreate(Bundle savedInstanceState) {\r\n       super.onCreate(savedInstanceState);\r\n       setContentView(R.layout.activity_main);\r\n       silent = findViewById(R.id.button1);\r\n       ring = findViewById(R.id.button2);\r\n       vibrate = findViewById(R.id.button3);\r\n       \/\/ instantiating AudiaManager\r\n       myAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\r\n\r\n       \/\/onClickListener for Vibrate\r\n       vibrate.setOnClickListener(new View.OnClickListener() {\r\n           @Override\r\n           public void onClick(View v) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0myAudioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);\/\/ setting the mode\r\n               Toast.makeText(MainActivity.this, \"Currently Vibrate Mode\",Toast.LENGTH_LONG).show();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ring.setBackgroundResource(R.color.colorPrimary);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0silent.setBackgroundResource(R.color.colorPrimary);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0vibrate.setBackgroundResource(R.color.colorAccent);\r\n           }\r\n       });\r\n\r\n       \/\/onClickListener for Ring\r\n\r\n       ring.setOnClickListener(new View.OnClickListener() {\r\n           @Override\r\n           public void onClick(View v) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0myAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\/\/ setting the mode\r\n               Toast.makeText(MainActivity.this, \"Currently Ringing Mode\",Toast.LENGTH_LONG).show();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ring.setBackgroundResource(R.color.colorAccent);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0silent.setBackgroundResource(R.color.colorPrimary);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0vibrate.setBackgroundResource(R.color.colorPrimary);\r\n           }\r\n       });\r\n\r\n\r\n       \/\/onClickListener for Silent\r\n       silent.setOnClickListener(new View.OnClickListener() {\r\n           @Override\r\n           public void onClick(View v) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0myAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT); \/\/ setting the mode\r\n               Toast.makeText(MainActivity.this, \"Currently silent Mode\",Toast.LENGTH_LONG).show();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ring.setBackgroundResource(R.color.colorPrimary);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0silent.setBackgroundResource(R.color.colorAccent);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0vibrate.setBackgroundResource(R.color.colorPrimary);\r\n           }\r\n       });\r\n   }\r\n}<\/pre>\n<p><strong>Step 3:<\/strong> since we have different color themes, we will now set the color values in <strong>color.xml<\/strong>. Open res\/values\/color.xml and write the code below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;resources&gt;\r\n   &lt;color name=\"colorPrimary\"&gt;#8C6AC9&lt;\/color&gt;\r\n   &lt;color name=\"colorPrimaryDark\"&gt;#020F61&lt;\/color&gt;\r\n   &lt;color name=\"colorAccent\"&gt;#6030B3&lt;\/color&gt;\r\n   &lt;color name=\"colorWhite\"&gt;#E4D8DC&lt;\/color&gt;\r\n&lt;\/resources&gt;<\/pre>\n<p><strong>Step 4:<\/strong> After writing the code, we will run it, and the following will come:<\/p>\n<p>These will be the three modes:<\/p>\n<p><strong>i) General Mode<\/strong><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/general-mode.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-76631 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/general-mode.jpg\" alt=\"general mode of android audio manager\" width=\"270\" height=\"585\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/general-mode.jpg 270w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/general-mode-69x150.jpg 69w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/general-mode-138x300.jpg 138w\" sizes=\"auto, (max-width: 270px) 100vw, 270px\" \/><\/a><\/p>\n<p><strong>ii) Silent Mode<\/strong><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/silent-mode.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-76632 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/silent-mode.jpg\" alt=\"silent mode of android audio manager\" width=\"270\" height=\"585\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/silent-mode.jpg 270w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/silent-mode-69x150.jpg 69w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/silent-mode-138x300.jpg 138w\" sizes=\"auto, (max-width: 270px) 100vw, 270px\" \/><\/a><\/p>\n<p><strong>iii) Vibrate Mode<\/strong><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/vibrate-mode.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-76633 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/vibrate-mode.jpg\" alt=\"vibrate mode of android audio manager\" width=\"270\" height=\"585\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/vibrate-mode.jpg 270w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/vibrate-mode-69x150.jpg 69w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/vibrate-mode-138x300.jpg 138w\" sizes=\"auto, (max-width: 270px) 100vw, 270px\" \/><\/a><\/p>\n<h2>Summary<\/h2>\n<p>So in this article, we read about Android Audio Manager and Android Audio Capture. Android Audio Manager deals with the adjusting and setting of Volume and Ringing modes of the device. On the contrary Android Audio Capture deals with recording the audio in a device using MediaRecorder class. We also implemented Android AudioManager in this article.<\/p>\n<p>Happy Learning\ud83d\ude03<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:1171,&quot;href&quot;:&quot;https:\\\/\\\/www.android.com\\\/intl\\\/en_in&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;https:\\\/\\\/www.android.com\\\/intl\\\/en_in\\\/&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this Android audio manager article, we will discuss two important things that are both related to the Audio System of an Android Device. The two topics that we are going to discuss are:&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":76691,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18722],"tags":[22047,22044,22045,22049,22048,22046],"class_list":["post-76628","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","tag-android-audio-capture","tag-android-audio-manager","tag-android-audio-manager-modes","tag-audio-manager-in-android","tag-how-to-implement-android-audiomanager","tag-other-methods-to-use-android-audio-manager"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Android Audio Manager - Control the audio system of your android app - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn the two important concepts of audio system of an android device, that is, Android audio manager and Android audio capture. Also, explore how to implement audio manager in android.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/android-audio-manager\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android Audio Manager - Control the audio system of your android app - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn the two important concepts of audio system of an android device, that is, Android audio manager and Android audio capture. Also, explore how to implement audio manager in android.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/android-audio-manager\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-04T04:22:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-25T08:34:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/android-audio-manager-audio-capture.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android Audio Manager - Control the audio system of your android app - DataFlair","description":"Learn the two important concepts of audio system of an android device, that is, Android audio manager and Android audio capture. Also, explore how to implement audio manager in android.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/","og_locale":"en_US","og_type":"article","og_title":"Android Audio Manager - Control the audio system of your android app - DataFlair","og_description":"Learn the two important concepts of audio system of an android device, that is, Android audio manager and Android audio capture. Also, explore how to implement audio manager in android.","og_url":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2020-03-04T04:22:31+00:00","article_modified_time":"2021-08-25T08:34:35+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/android-audio-manager-audio-capture.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Android Audio Manager &#8211; Control the audio system of your android app","datePublished":"2020-03-04T04:22:31+00:00","dateModified":"2021-08-25T08:34:35+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/"},"wordCount":770,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/android-audio-manager-audio-capture.jpg","keywords":["Android Audio Capture","Android Audio Manager","Android Audio Manager Modes","audio manager in android","How to Implement Android AudioManager?","Other Methods to Use Android Audio Manager"],"articleSection":["Android Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/android-audio-manager\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/","url":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/","name":"Android Audio Manager - Control the audio system of your android app - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/android-audio-manager-audio-capture.jpg","datePublished":"2020-03-04T04:22:31+00:00","dateModified":"2021-08-25T08:34:35+00:00","description":"Learn the two important concepts of audio system of an android device, that is, Android audio manager and Android audio capture. Also, explore how to implement audio manager in android.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/android-audio-manager\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/android-audio-manager-audio-capture.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/03\/android-audio-manager-audio-capture.jpg","width":802,"height":420,"caption":"android audio manager"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/android-audio-manager\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Android Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/android\/"},{"@type":"ListItem","position":3,"name":"Android Audio Manager &#8211; Control the audio system of your android app"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/76628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=76628"}],"version-history":[{"count":8,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/76628\/revisions"}],"predecessor-version":[{"id":86506,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/76628\/revisions\/86506"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/76691"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=76628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=76628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=76628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}