In my app I have to play the siren sound on tapping the button, I can able to play it when ringer volume is set to some value, but my problem is when user kept their ringer volume to zero, how can I play it with maximum sound?
Asked
Active
Viewed 2,180 times
0
-
possible duplicate of [Increase volume programmatically](http://stackoverflow.com/questions/7138180/increase-volume-programmatically) – Nimit Parekh Mar 04 '13 at 10:12
-
but if i do it in that way,my app get rejected – Mage Mar 04 '13 at 11:50
2 Answers
1
Officially you can't do this. As a smartphones user, I wouldn't appreciate to set my volume at 10% and have an app that rings at max volume.
You can however try to use Celestial.framework
, but your application will be rejected from the App Store.

Rob
- 15,732
- 22
- 69
- 107
0
try this code ,it only work in device
[[MPMusicPlayerController applicationMusicPlayer] setVolume:setvalue];

NANNAV
- 4,875
- 4
- 32
- 50
-
Its working but volume UI appearing in this condition. Could you please provide me any solution to remove this volume UI. – Alok May 08 '17 at 08:05