Praveen
Praveen

Reputation: 522

iPhone Audio App not entering sleep mode

I am using Matt Gallagher AudioStreamer to stream audio from the network. I specified "App plays audio" and "Application does not run in background -> NO". My app is playing audio in background and everything is working fine.

The problem is the app is NOT entering sleep mode and is always awake whether the app is playing the audio or not.

Is this because "App plays audio" specified? How do I make it to behave like normal apps.

Upvotes: 0

Views: 173

Answers (2)

Praveen
Praveen

Reputation: 522

I did not realize that I was running the app from XCode. Once I disconnected the phone from XCode and ran the app it is entering sleep mode.

Upvotes: 1

Björn Kaiser
Björn Kaiser

Reputation: 9912

If you want to enable the idle timer, simply set the idleTimerDisabled property of your application to NO. If this does not work as expected, check the source of the AudioStreamer library, maybe it disables it somewhere.

[[UIApplication sharedApplication] setIdleTimerDisabled:NO];

Upvotes: 0

Related Questions