Home | History | Annotate | Download | only in managing-audio
      1 page.title=Managing Audio Playback
      2 
      3 trainingnavtop=true
      4 startpage=true
      5 next.title=Controlling Your App's Volume and Playback
      6 next.link=volume-playback.html
      7 
      8 @jd:body
      9 
     10 <div id="tb-wrapper"> 
     11 <div id="tb">
     12 
     13 <h2>Dependencies and prerequisites</h2> 
     14 <ul>
     15   <li>Android 2.0 (API level 5) or higher</li>
     16   <li>Experience with <a href="{@docRoot}guide/topics/media/mediaplayer.html">Media
     17 Playback</a></li>
     18 </ul>
     19 
     20 <h2>You should also read</h2>
     21 <ul>
     22   <li><a href="{@docRoot}guide/components/services.html">Services</a></li>
     23 </ul>
     24 
     25 </div> 
     26 </div>
     27 
     28 
     29 <p>If your app plays audio, its important that your users can control the audio in a predictable
     30 manner. To ensure a great user experience, its also important that your app manages the audio focus
     31 to ensure multiple apps arent playing audio at the same time.</p> 
     32 
     33 <p>After this class, you will be able to build apps that respond to hardware audio key presses, 
     34 which request audio focus when playing audio, and which respond appropriately to changes in audio
     35 focus caused by the system or other applications.</p> 
     36 
     37 
     38 
     39 
     40 <h2>Lessons</h2> 
     41  
     42 <!-- Create a list of the lessons in this class along with a short description of each lesson.
     43 These should be short and to the point. It should be clear from reading the summary whether someone
     44 will want to jump to a lesson or not.--> 
     45  
     46 <dl>
     47   <dt><b><a href="volume-playback.html">Controlling Your Apps Volume and
     48 Playback</a></b></dt>
     49   <dd>Learn how to ensure your users can control the volume of your app using the hardware or
     50 software volume controls and where available the play, stop, pause, skip, and previous media
     51 playback keys.</dd> 
     52  
     53   <dt><b><a href="audio-focus.html">Managing Audio Focus</a></b></dt>
     54   <dd>With multiple apps potentially playing audio it's important to think about how they should
     55 interact. To avoid every music app playing at the same time, Android uses audio focus to moderate
     56 audio playback. Learn how to request the audio focus, listen for a loss of audio focus, and how to
     57 respond when that happens.</dd> 
     58  
     59   <dt><b><a href="audio-output.html">Dealing with Audio Output Hardware</a></b></dt>
     60   <dd>Audio can be played from a number of sources. Learn how to find out where the audio is being
     61 played and how to handle a headset being disconnected during playback.</dd> 
     62  </dl>