How to determine the current iPhone call level?

I disconnected the iPhone-riker using AVSystemController, but I do not know how to determine the current call level. Any ideas?

PS Yes, I know that using AVSystemController can cause an application to ban the use of the App Store. It's not a problem.

+3
source share
1 answer

You can’t change the volume of the device programmatically, however, MPVolumeView (volume slider) is there to change the volume of the device, but only through interaction with the user, for example, creating your own slider and marking it with a “volume” or something like that.

MPVolumeView - , MediaPlayer.framework , MPVolumeView . MPVolumeView , . AVAudioPlayer .

, , :

  musicPlayer = [[MPMusicPlayerController iPodMusicPlayer];
  musicPlayer.volume = 1; // device volume will be changed to maximum value

, .

+1

Source: https://habr.com/ru/post/1539567/


All Articles