QBM5
QBM5

Reputation: 2788

WP8 Playing audio under lock screen

I see apps like white noise, and sleep that play audio and the audio continues to play after the screen has been locked. The applications do not use the WP audio playback agent as the universal volume control does not become available.

I am trying to recreate said functionality but every thread I read is either about the WP audio playback agent or UserIdleDetectionMode = IdleDetectionMode.Disabled, neither of which recreate what I am looking for.

Any help would be appreciated

Upvotes: 0

Views: 272

Answers (3)

QBM5
QBM5

Reputation: 2788

I found the answer minutes after I posted but SO wouldnt let me answer my own question.

ApplicationIdleDetectionMode = IdleDetectionMode.Disabled did the trick.

Upvotes: 1

Derek Beattie
Derek Beattie

Reputation: 9478

Use the background AudioPlayerAgent and set the PlayerControls on the AudioTrack to EnabledPlayerControls.None.

EnabledPlayerControls Enum

I can't check right now, this may just disable them but it's another option.

Upvotes: 1

Claus Jørgensen
Claus Jørgensen

Reputation: 26347

The applications do not use the WP audio playback agent

Seems you already known the answer. If you want to play audio under the lock screen, you have the use the Audio Playback Agent.

Upvotes: 0

Related Questions