I'm trying to reproduce the functionality of built-in Mail application when a new message arrives while you are listening to iPod music.
What happens with the Mail app is:
I know how to play a sound and cause vibration, what I don't know is how to lower iPod's volume and restore it after my sound plays.
How can I reproduce this same functionality in my app with SDK 2.2? I know third party apps can't run in the background. My users will play the iPod then have my app in the foreground.
See my answer to that other question of yours ;)
[[MPMusicPlayerController iPodMusicPlayer] setVolume:x.y]
where you change x.y through a timer or as one-off. In OS3, of course.
Have you tried simply playing the sound? I suspect this is automatic functionality on the part of the SDK.
edit: according to this question, you can fade the ipod sound out but not back in.
(I'm surprised this functionality isn't automatic and default behaviour. But then I've always found the elegance of the apple APIs to be inversely proportional to the elegance of the interface :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With