1 page.title=Headset Expected Behavior 2 @jd:body 3 4 <!-- 5 Copyright 2015 The Android Open Source Project 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 --> 19 <div id="qv-wrapper"> 20 <div id="qv"> 21 <h2>In this document</h2> 22 <ol id="auto-toc"> 23 </ol> 24 </div> 25 </div> 26 27 <p> 28 This article details the functional requirements for 29 <a href="plug-headset-spec.html">3.5 mm plug</a> and 30 <a href="usb-headset-spec.html">USB</a> headsets.</p> 31 <p> 32 When verifying the behaviors of the device and the audio headset, note that the 33 requirements:</p> 34 <ul> 35 <li>only apply when no other audio accessories (e.g. Bluetooth) are 36 available</li> 37 <li>cover the default behavior for devices and do not apply to applications 38 that use audio routing APIs to select which audio peripheral to use</li> 39 </ul> 40 41 <h2 id=media>Media</h2> 42 43 <p>If a user connects a headset to the device while playing media, the audio 44 output (sound) should be heard only via the headset.</p> 45 46 <p>For example, while playing media with the <a 47 href="https://github.com/googlesamples/android-UniversalMusicPlayer">open 48 source</a> <a 49 href="https://android-developers.blogspot.com/2015/03/a-new-reference-app-for-multi-device.html">Universal 50 Music Player</a>, pressing the play/pause button should pause playback. 51 Pressing the same button when media is paused should resume playback.</p> 52 53 <p>If the headset has volume control buttons: </p> 54 55 <ul> 56 <li> Pressing the volume-up button should increase the volume incrementally each 57 time the button is pressed until maximum volume is reached. If the volume-up 58 button is pressed and held, the volume should gradually increase to maximum 59 volume setting. 60 <li> Pressing the volume-down button should decrease the volume incrementally each 61 time the button is pressed until entirely muted. If the volume-down button is 62 pressed and held, the volume should gradually decrease to silent. 63 <li> Pressing the volume-up button when in a muted state should increase the volume 64 one notch at a time starting from silent. 65 </ul> 66 67 <p><strong>Recommended for Apps</strong>: On disconnecting the headset, sound output should stop and playback should 68 pause. On reconnecting, playback should not start again unless the user presses 69 the play button. Upon pressing play, sound output should again be limited to 70 the headset.</p> 71 72 <h3 id=one_button>One button</h3> 73 74 <img src="images/media_one.png" alt="Button functions for one-button headsets handling a media stream."> 75 </span> 76 77 <p class="img-caption"><strong>Figure 1.</strong> Button functions for one-button headsets handling a media stream.</p> 78 79 <h3 id=two_buttons>Two buttons</h3> 80 81 <img src="images/media_two.png" alt="Button functions for two-button headsets handling a media stream."> 82 83 <p class="img-caption"><strong>Figure 2.</strong> Button functions for two-button headsets handling a media stream.</p> 84 85 <h3 id=three_buttons>Three buttons</h3> 86 87 <img src="images/media_three.png" alt="Button functions for three-button headsets handling a media stream."> 88 89 <p class="img-caption"><strong>Figure 3.</strong> Button functions for three-button headsets handling a media stream.</p> 90 91 <h3 id=four_buttons>Four buttons</h3> 92 93 <img src="images/media_four.png" alt="Button functions for four-button headsets handling a media stream."> 94 95 <p class="img-caption"><strong>Figure 4.</strong> Button functions for four-button headsets handling a media stream.</p> 96 97 <h2 id=telephony>Telephony</h2> 98 99 100 <p>If a user connects a headset to the device while a call is in progress, the 101 conversation should continue on the headset. The call should not get 102 disconnected, and the microphone should not be muted. If present, volume 103 buttons should behave identically to media playback.</p> 104 105 <p class="note"><strong>Note</strong>: The actions to mute and hang up a phone 106 call may differ across Android devices. This documents the most common behavior; 107 but for some devices, a short press on the headset mutes the call, and a long 108 press hangs up.</p> 109 110 <h3 id=one_button>One button</h3> 111 112 <img src="images/telephony_one.png" alt="Button functions for one-button headsets handling a phone call."> 113 114 <p class="img-caption"><strong>Figure 5.</strong> Button functions for one-button headsets handling a phone call. </p> 115 116 <h3 id=two_buttons>Two buttons</h3> 117 118 <img src="images/telephony_two.png" alt="Button functions for two-button headsets handling a phone call."> 119 120 <p class="img-caption"><strong>Figure 6.</strong> Button functions for two-button headsets handling a phone call. </p> 121 122 <h3 id=three_buttons>Three buttons</h3> 123 124 <img src="images/telephony_three.png" alt="Button functions for three-button headsets handling a phone call."> 125 126 <p class="img-caption"><strong>Figure 7.</strong> Button functions for three-button headsets handling a phone call. </p> 127 128 <h3 id=four_buttons>Four buttons</h3> 129 130 <img src="images/telephony_four.png" alt="Button functions for four-button headsets handling a phone call."> 131 <p class="img-caption"><strong>Figure 8.</strong> Button functions for four-button headsets handling a phone call. </p> 132 133 <h2 id=voice_assistance>Voice assistance</h2> 134 135 <p>The voice assistance button is a new inline control standard for consistently 136 and conveniently accessing a voice search feature from any approved wearable 137 audio device. By pressing the button defined here, users will hear the two-tone 138 signature <a href="http://en.wikipedia.org/wiki/Earcon">earcon</a> indicating that the device is listening and ready to receive the query.</p> 139 140 <p>Whether embedded into a multi-function button or highlighted as a single 141 button, it should always be quickly accessible, ergonomically correct, and 142 placed intuitively as described in the following section.</p> 143 144 <h2 id=buttons_and_function_mapping>Buttons and function mapping recommendations</h2> 145 146 <p>The following diagrams depict the acceptable configuration of the Android voice 147 assistance button.</p> 148 149 <h3 id=options>Options</h3> 150 151 <img src="images/button_configuration.png" alt="Button configuration options."> 152 153 <p class="img-caption"><strong>Figure 9.</strong> Button configuration options. </p> 154 155 <p>Buttons should always be front facing and spaced out so they can be easily 156 located by touch only.</p> 157 158 <h3 id=spacing>Spacing</h3> 159 160 <p>Buttons must be more than 5 mm and must have at least 5 mm distance between 161 buttons. For four-button headsets, there must be at least 9 mm of space between 162 button D and the cluster of other buttons. </p> 163 164 <img src="images/button_spacing.png" alt="Button spacing requirements"> 165 166 <p class="img-caption"><strong>Figure 10.</strong> Button spacing requirements.</p> 167 168 <h3 id=icon>Icon</h3> 169 170 <p>In the following diagram, A is unlabeled or labeled with a dot. B is labeled 171 with a + or an arrow pointing up. C is labeled with a - or an arrow pointing 172 down. D is labeled with the selected button icon.</p> 173 174 <img src="images/button_icons.png" alt="Button icon requirements"> 175 <p class="img-caption"><strong>Figure 11.</strong> Button icon requirements. </p> 176 177 <h3 id=sizing>Sizing</h3> 178 179 <p>The following diagram shows the ratio of button icon to the space around it.</p> 180 181 <img src="images/icon_sizing.png" alt="Voice search button icon sizing requirements"> 182 183 <p class="img-caption"><strong>Figure 12.</strong> Voice search button icon sizing requirements. </p> 184 185 <h3 id=microphone_port>Microphone port</h3> 186 187 <p>The microphone should never be obstructed when operating the buttons. Place the 188 port away from finger interface area.</p> 189 190 <img src="images/microphone.png" alt="Microphone placement"> 191 192 <p class="img-caption"><strong>Figure 13.</strong> Microphone placement. </p> 193