0

In android, ways to get/set stream volume by using AudioManager:

audioManager.getStreamVolume(AudioManager.STREAM_MUSIC)
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC,musicVolume,0)

what are equivalents in iOS?

I managed to find categories in AVAudioSessionand system volume But find no way to set/get specific category volume.

AlexWei
  • 1,043
  • 2
  • 8
  • 32

1 Answers1

1

Look at this apple documentation MPVolumeView - https://developer.apple.com/reference/mediaplayer/mpvolumeview.

  • I am looking for a way to get/set it directly without native UI, since I am using Unity here. But your answer provide some clues for me. Thanks – AlexWei Jun 17 '19 at 08:07
  • 1
    Check this link. They should help you get started. -https://stackoverflow.com/questions/36688123/how-to-set-app-volume-separately-from-system-volume-ios-device-volume-physical – codesleeper Jun 17 '19 at 08:14