Search code examples
windows-phone-8windows-phonescheduled-tasksbackground-agents

How to check from scheduled agent if the foreground app is running


Is it possible to check if the foreground app is running from a scheduled task? In my case, it duplicates a functionality of the app - so I could skip that part in the agent to preserve resources.

Thanks


Solution

  • You cannot access a list of processes or anything similiar that would give you the info if your app is running.

    You can do smething like storing a flag to the settings when your app starts and erasing it when your app exists and check this flag in the background agent.