I am trying to create an IOS app in which you assess the settings of the phone and in my case I need to access the mute setting in settings. Can someone please help me figure this out? Mainly i just want to know if you can and how to access the setting of an IOS deviceI do not have any source code yet but I will try to get some up once I get an answer or some help. Thank you
Asked
Active
Viewed 115 times
1
-
You can not access the settings a such, but you can use `AudioSession` to detect the mute toggle: http://stackoverflow.com/questions/287543/how-to-programmatically-sense-the-iphone-mute-switch – rckoenes Sep 29 '14 at 13:55
-
You get this sorted out? – Austen Chongpison Oct 01 '14 at 01:11
3 Answers
0
Pretty sure that is not allowed due to sandboxing restrictions.
You cannot accessing the Settings App from your own App, you can however adjust the system volume from an App if that is all you want to do.
Check out MPVolumeView.
https://developer.apple.com/LIBRARY/ios/documentation/MediaPlayer/Reference/MPVolumeView_Class/index.html#//apple_ref/occ/cl/MPVolumeView

Christian Fox
- 390
- 2
- 15
-
Is there are way to mute it? Like the mute switch does or to just turn it down to zero – Andrew Sep 29 '14 at 16:34
-
-
No, you can't use MPVolumeView to mute, just turn the volume down to zero. So it doesn't provide the answer you were looking for really. It looks like there is no simple way to detect if a device is muted or not. But the stack overflow question that aus10c and rckoenes linked to seems to provide solutions. You'll have to take a look at those. Although if you don't have much experience they may be a bit complicated. – Christian Fox Sep 29 '14 at 17:28
-
How to run in the background? Well figure out how to do it first (walk in the foreground before you can run in the background! - that deserves an up vote alone… hehe). If you want to learn about running code on background threads read up about GCD Grand Central Dispatch. I'm not sure how experienced you are but if you are new to programming don't worry too much about multithreading and background processes just yet, concentrate on getting things working and worry about speed later. – Christian Fox Sep 29 '14 at 17:34
0
What you are specifically writing about is not possible but you will probably find something that answers your use case in this SO question:

Community
- 1
- 1

Austen Chongpison
- 3,966
- 1
- 20
- 17
0
No way to do this easily. If you want to do what you want in a one line way, take a look at this class : http://hoishing.wordpress.com/2014/05/08/mute-checking-in-ios7/

Jonathan F.
- 2,357
- 4
- 26
- 44