i'm using the code of this link: http://blog.stormyprods.com/2008/09/proper-usage-of-mpvolumeview-class.html it is working on an ipod touch, but NOT on iphones. what can be the reason for that?
Asked
Active
Viewed 725 times
0
-
Did you read the first lines of the post that link? "IMPORTANT EDIT! 11/14/09 This post is no longer relevant regarding the details on keeping the volume slider in sync with the system volume. The undocumented call is no longer needed. In fact, if you use the call to "_updateVolumeFromAVSystemController", Apple will now reject your app during the review process. I leave this post here for historical reference, but it is no longer relevant and should NOT be used!!" – mahboudz Dec 07 '09 at 09:26
1 Answers
0
Two things:
- I think iPhone OS 3.0 does a better job of syncing the MPVolumeView slider with changes to the system volume received from the buttons on side. So the workaround on that blog (listening for NSNotifications) may no longer be necessary.
- On the iPhone, volume changes are contextual. If your app is currently playing sound, then hitting the volume buttons (or, presumably, MPVolumeView) affects the volume level of your app's audio. But if your app isn't producing sound, then you are just changing the ringer volume. This might explain why your current code works on touches, which don't have ringers.

invalidname
- 3,175
- 21
- 18