It's advised to call Abort() to notify the foreground app know that background was canceled intentionally. But how does the foreground app know that?
What's the actually different between Abort() and NotifyComplete()? Does anyone know this?
It's advised to call Abort() to notify the foreground app know that background was canceled intentionally. But how does the foreground app know that?
What's the actually different between Abort() and NotifyComplete()? Does anyone know this?
Your BackgroundAgent should always call NotifyComplete or Abort. It informs the OS that it can free the resources and allocate them to other processes.
NotifyComplete means that the task has completed successfully and the agent will fire in the futere. Abort means that there was an error and agent won't be fired in the future unless you handle this in foreground app. More information you can find here at MSDN. There is also a good example:
As it is said - in foreground app you can check ScheduledAction.IsScheduled, whether future invocations of the action are scheduled to occur (if it complited succesfully or failed).