0

I am working on app in Window Phone.In this app i am using background agent for running background task.Further more i want that this background agent should start at 9 A.M. and should over at 6 P.M. daily automatically. How can i do it?

Ritesh Gupta
  • 171
  • 1
  • 2
  • 19

1 Answers1

0

You can't stop backgroundagent without opening the.

But you can do one thing in the backgroundagent's Oninvoke method check the time before executing the functionality. Like if you want to display a toast notification from the background agent, check the current time is in between 9A.M and 6P.M, if this condition satisfied then only display the toast or else don't do any thing.

Swapnika
  • 480
  • 4
  • 14