Questions tagged [avsystemcontroller]

13 questions
13
votes
4 answers

Detect iPhone Volume Button Up Press?

Is there a notification that I can listen to that will tell me when an iPhone's volume is turned up? I know about the AVSystemController_SystemVolumeDidChangeNotification, but it is essential that the notification only be triggered when the volume…
The Kraken
  • 3,158
  • 5
  • 30
  • 67
5
votes
1 answer

Mute/Silence an iOS device programmatically?

I'm trying to mute the device's ringer from within my app, but for some reason using AVSystemController like in this answer ( How to disable iOS System Sounds ) won't let me silence the device ALL the way down.. it drops it to a volume of 1 bar, but…
itai alter
  • 591
  • 1
  • 7
  • 22
4
votes
1 answer

get ringer volume level using AVSystemController in ios

How can i get iphone's current ringer volume level using AVSystemController I also tried below code to check volume level MPVolumeView *slide = [MPVolumeView new]; UISlider *volumeViewSlider; for (UIView *view in [slide subviews]){ if ([[[view…
Vidhi
  • 2,026
  • 2
  • 20
  • 31
3
votes
1 answer

How to determine the current level of the iPhone ringer?

I'm silencing the iPhone ringer with AVSystemController, but I don't know how to determine the current level of the ringer. Any ideas? PS Yes I know that using AVSystemController might get the app banned from the App Store. It's not an issue.
cfischer
  • 24,452
  • 37
  • 131
  • 214
3
votes
1 answer

AVSystemController_SystemVolumeDidChangeNotification triggers when device locked

Using iOS 12, I am observing AVSystemController_SystemVolumeDidChangeNotification to detect volume presses to capture images: let volumeView = MPVolumeView(frame: CGRect(x: 0, y: -40, width: 0, height: 0)) // override volume…
shim
  • 9,289
  • 12
  • 69
  • 108
2
votes
5 answers

using AVSystemController in iPhone App

I want to reduce the ringing volume of iPhone programmatically, I came to know that it is possible with AVSystemController, But I know, it is a private method. If I use it, will apple reject the app or please suggest me the alternative way
KishoreThindaak
  • 391
  • 2
  • 4
  • 14
2
votes
0 answers

MPMoviePlayerController - AVSystemController_SystemVolumeDidChangeNotification called not right

I have MPMoviePlayerController and i m trying to get notify when user change the volume. I listen to this event: AVSystemController_SystemVolumeDidChangeNotification by this code: [[NSNotificationCenter defaultCenter] addObserver:self …
1
vote
1 answer

AVSystemController_SystemVolumeDidChangeNotification not giving callback for the first time

I want to check if both the volume buttons are working fine. So I set the observer AVSystemController_SystemVolumeDidChangeNotification to check that. NotificationCenter.default.addObserver(self, selector: #selector(volumeCallback(notification:)),…
Chanchal Chauhan
  • 1,530
  • 13
  • 25
0
votes
0 answers

How to set system volume as per UIslider value ? IOS Swift 3.0

I am getting system volume using following code, But how to set system volume when change UISlider value ? override func viewDidLoad() { super.viewDidLoad() NotificationCenter.default.addObserver(self,…
AtulParmar
  • 4,358
  • 1
  • 24
  • 45
0
votes
0 answers

Ringtones set to high volume when Received SMS from particular Number

I am working on one iOS app which have a requirement that if phone received sms from particular number so set ringtones volume to loud. I know how to increase or decrease the volume which most likely to this. [[AVSystemController…
AFTAB MUHAMMED KHAN
  • 2,189
  • 3
  • 18
  • 24
0
votes
0 answers

Is there any alternate solution to mute ringer programmatically?

I'm working on an iphone application which used to mute the phone ringer programmatically.Currently I'm using celestial.framework to mute,but I come across that the apple will reject using private framework.Please anybody give right solution to…
iniyan
  • 131
  • 3
  • 15
0
votes
1 answer

Restore ringer volume IOS using avsystemcontroller is not working

I set iphone ringer volume to zero by using following code (Its Working). My problem is i want to restore and with the same code just changing volume level is not working. Please suggest an appropriate way to do this. NSBundle *bundle = [NSBundle…
Hussaan S
  • 271
  • 1
  • 12
0
votes
1 answer

AVSystemController to disable iOS System sounds gives not found for architecture i386 error

I want to silent the ringer volume. So I am using this link to do that - How to disable iOS System Sounds But if I use the code: - (void) setSystemVolumeLevelTo:(float)newVolumeLevel { Class avSystemControllerClass =…
ScarletWitch
  • 522
  • 6
  • 23