avsystemcontroller

using AVSystemController in iPhone App

萝らか妹 提交于 2020-01-15 06:09:48
问题 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 回答1: - (void) setSystemVolumeLevelTo:(float)newVolumeLevel { Class avSystemControllerClass = NSClassFromString(@"AVSystemController"); id avSystemControllerInstance = [avSystemControllerClass performSelector:@selector(sharedAVSystemController)]; NSString

get ringer volume level using AVSystemController in ios

走远了吗. 提交于 2019-12-23 12:46:48
问题 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 class] description] isEqualToString:@"MPVolumeSlider"]) { volumeViewSlider = (UISlider *) view; } } float val = [volumeViewSlider value]; But when i print / check val, it returns 1.00 I also tried below code musicPlayer = [MPMusicPlayerController

How to determine the current level of the iPhone ringer?

痴心易碎 提交于 2019-12-05 02:07:45
问题 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. 回答1: You cannot change device volume programatically, however MPVolumeView (volume slider) is there to change device volume but only through user interaction, like making your own slider and labeling it 'volume' or something. MPVolumeView is a control in

Detect iPhone Volume Button Up Press?

这一生的挚爱 提交于 2019-11-27 12:53:57
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 has been turned up, not up or down. Secondly, how can I hide the translucent view that appears when the volume up button is pressed, showing the system's volume? Camera+ has implemented this. There is no documented way to to this, but you can use this workaround. Register for AVSystemController_SystemVolumeDidChangeNotification notification and add

Mute/Silence an iOS device programmatically?

六眼飞鱼酱① 提交于 2019-11-27 09:20:46
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 not completely silent. I know it can be done, probably with a private API like AVSystemController, and I know that Apple will still approve the app if the user expects this kind of functionality from the app (since there are already 2 apps I found in the App Store which mutes the device programmatically with no need of jailbreaking or anything like

Detect iPhone Volume Button Up Press?

本小妞迷上赌 提交于 2019-11-26 16:08:52
问题 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 has been turned up, not up or down. Secondly, how can I hide the translucent view that appears when the volume up button is pressed, showing the system's volume? Camera+ has implemented this. 回答1: There is no documented way to to this, but you can

Mute/Silence an iOS device programmatically?

陌路散爱 提交于 2019-11-26 12:48:03
问题 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 not completely silent. I know it can be done, probably with a private API like AVSystemController, and I know that Apple will still approve the app if the user expects this kind of functionality from the app (since there are already 2 apps I