Alexander Slabinsky
Alexander Slabinsky

Reputation: 681

UILocalNotification loud sound in background

Is there a way to play UILocalNotification sound loudly ignoring the volume settings? Like this happen in "Find my iPhone" app. I found some answers on this question but all they according to charge and play AVAudioPlayer - which is not correct. We are not able to get the event of UILocalNotification appearing and try to play the sound from another source like AVAudioPlayer. We got the event in AppDelegate when user press "OK" button. So is ther a way to play loud sound by UILocalNotification itself?

Upvotes: 1

Views: 721

Answers (1)

yuji
yuji

Reputation: 16725

No. If your app is running in the foreground, you can use application:didReceiveLocalNotification: and programatically play a sound. Otherwise, you're limited to the options in the UILocalNotification API, which is limited to a very specific set of options and does not let you set the sound volume.

Upvotes: 1

Related Questions