开发者

Put iPhone mute On/Off programmatically. (Force Mute/UnMute)

I am creating a tweak, and i want to "override" the Mute/UnMute programmatically.

I am fully aware that this is Not Apple approved.

How would i approach this ? Currently i can only开发者_如何学C set the volume down like so:

AVSystemController *AVSysController = [objc_getClass("AVSystemController") sharedAVSystemController]; 
[AVSysController setActiveCategoryVolumeTo:0.0];


I would just stick with changing the volume (heck, store what it used to be so that you can "u nmute" it later). Since there's a physical mute switch, it will be confusing for the user if the switch says the phone is muted when in reality you've unmuted it by yourself (or vice versa).


No. It is not possible. Since there is a physical switch available to mute/unmute the entire device, there is no software method available for it.

And even if someone tried to do it using private APIs , it gets conflict with physical switch available on the device.

May be just to give respect to available physical switch, apple has purposefully not provided software API for the same.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜