0

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?

Cœur
  • 34,719
  • 24
  • 185
  • 251
Mage
  • 151
  • 1
  • 14

2 Answers2

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,407
  • 20
  • 67
  • 106
0

try this code ,it only work in device

[[MPMusicPlayerController applicationMusicPlayer] setVolume:setvalue];
NANNAV
  • 4,825
  • 4
  • 30
  • 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