windows phone 8 - BackgroundAudioAgent with a dynamic playlist -


i developing app has capability of playing audio tracks streamed server. app needs able playback audio when screen locked or if app put in background.

=====

for background audio playback in windows phone, background audio agent required.

the sample provided microsoft shows basics: http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202978(v=vs.105).aspx

in sample, background audio agent has list of static tracks , when user taps skip/prev in main project, forwards singleton backgroundaudioplayer object in turn uses event handler in backgroundaudioagent project load next/prev song.

but, think common usecase main project have details of play list (like list retrieved server) , need backgroundaudio agent forward request main project.

my question is

  1. is there way forward user action audio agent main project main project can determine track play?

p.s: cannot use mediaelement (which seemed work fine in window store app , provides background support) because in windows phone sdk has no background support.

edit: when screen locked, application can terminated if background agent running, guess there no mechanism forward request app. mean, background agent has self sufficient... poor design have jump through hoops seemingly common behavior (playing audio stored in remote server requires authentication) .

at point, considering writing url specific information file , have background audio agent read saved file , authenticate server , create audio tracks. handshake show current audio information when application resumes complex least.

i hope wrong , there easier way this. love see how others have handled this.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -