Our app uses the MPMediaPLayer
. We also had the idleTimerDisabled=YES
code in the ApplicationFinishedLaunching
, which works EXCEPT if untethered, and there is already a current nowPlayingItem
which is left playing (or unpaused, if paused at app startup). Obviously this is all with the Settings -> General -> Autolock
set to some timed value.
By adding idleTimerDisabled=NO
, immedately followed by idleTimerDisabled=YES
in one of the other bits of code AFTER we had figured out what bit of music we would get playing seemed to solve the problem. Just setting it to YES
was insufficient.. and subsequent queries had always indicated the correct value (YES
).. so it appears the Apple code ignores the setting of the value IF there is a current piece of music and that is not changed by your code.. but does notice a change of value.
This is all under iOS 3.0.