How to mute application sound when hardware mute button on iPhone and iPad is on.I want to detect that whenever hardware mute button is turned on and off my application sound will be turned on and off.
Asked
Active
Viewed 858 times
1 Answers
1
You need not listen to the event, just use appropriate audio session category. AVAudioSessionCategoryAmbient or AVAudioSessionCategorySoloAmbient

KudoCC
- 6,912
- 1
- 24
- 53
-
Thats sound a bit helpful.Actuall what i want to do is i have background music been played and some buttons with sounds as well when ever i pressed my button it disables my background music as button sound has to be played. – Muhammad Usman Oct 30 '13 at 09:51
-
Use AVAudioSessionCategoryAmbient category which allows mixing. – KudoCC Oct 30 '13 at 10:00