I am trying to use setVolumeControlStream inside a Fragment used in a ViewPager. When building, Gradle throws
error: cannot find symbol method setVolumeControlStream(int)
Is there any way to call the following in a Fragment?
setVolumeControlStream(AudioManager.STREAM_VOICE_CALL);
Have you tried
getActivity().setVolumeControlStream(AudioManager.STREAM_VOICE_CALL);