0

I am using the Background Agent to play audio.

I need to synchronize this audio and some Html / JavaScript code present within the app.

However, if the Html code which I need to run is displayed in a "WebBrowser" coltrol, then that code will be suspended too. Is there any other alternative to have the app run the Html code even when the app is in background, and then, when the app is active, to display the latest status of execution?

user3261909
  • 145
  • 1
  • 2
  • 11
  • You want to download/run your Html code when App is in background (dormant/tombstoned)? – Romasz Feb 13 '14 at 09:28
  • I am looking for a control which can display and execute HTML5 and JavaScript code in the foreground as well as background (when the app is suspended), so that it would be synchronized with background audio. This is not possible with WebBrowser. – user3261909 Feb 13 '14 at 09:35
  • I doubt it will be available with any control - when your App goes background all its threads are stopped. You may try to use Background Agents to perform some WebRequests. – Romasz Feb 13 '14 at 09:51

1 Answers1

0

When you app goes to the background, it no longer runs and you cannot execute any code. The best you can do is detect that your app is activated again (brought to the foreground) and change your HTML/JavaScript according to the state of the Background Audio.

Igor Kulman
  • 16,211
  • 10
  • 57
  • 118