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 -
audioManager = (AudioManager) getSystemService(AUDIO_SERVICE);
setVolumeControlStream(AudioManager.STREAM_MUSIC);
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.