title: How do I manage the audio output levels with PJSUA2 for Android
body: <p>I have an Android project that uses PJSUA2 for VoIP communication and everything else works just fine. I am stymied however, with a problem where I cannot get the Volume controls to work in the Activity where my active call is shown. I have tried  doing it the recommended way - </p>
  
  <pre><code>audioManager = (AudioManager) getSystemService(AUDIO_SERVICE);
  setVolumeControlStream(AudioManager.STREAM_MUSIC);
  </code></pre>
  
  <p>This doesn't do anything. I need to know if using OnKey Listeners is a feasible alternative to manually increase and decrease the volume or if I am missing something completely which will let me do it the preferred way.</p>