0

i Know how to create a background agent and how it invokes its onInvoke method.

now is there any way i can create a background thread in the onInvoke method and do a long running task for 1-2 day?

Please the question is not why would i need this,the question is weather it can be done or not.

i don't want the agent to be scheduled for every 30 min,rather on its first invoke,it should start a background thread and do work unless its stopped by app logic.

Thanks

Shofiqul Alam
  • 585
  • 1
  • 7
  • 29

1 Answers1

0

You cannot have a Background Agent exceeding 10 min.

Periodic Agent: 25 seconds

Resource-intensive Agent: 10 minutes

http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202942(v=vs.105).aspx#BKMK_ConstraintsforPeriodicAgents

fantastik78
  • 735
  • 6
  • 21
  • One thing to note is that Resource-intensive agents run in such rare cases, that they are not reliable. They might help in some cases, but the app should work just fine without them. – yasen Jun 18 '14 at 13:47
  • ok so if i start abackground agent at my app launch,and then do a photo upload service with resource intensive task ,will it continue as long as i dont kill itself? i saw photo upload service and audio service dont get terminated,just clearing my concept. – Shofiqul Alam Jun 22 '14 at 05:50