locked
BackgroundAgent sample - not working :-/ RRS feed

  • Question

  • Hi,
    I've downloaded the BackgroundAgent sample from Microsoft and tried it on both new beta emulator (downloaded yesterday) and my Mango developer beta.

    It worked well, creating a toast every minute, but I've noticed tat when I've commented the "ScheduledActionService.LaunchForTest" part, nothings happening both on phone and emulator. I have this sample running on the phone for half a day now, and it looks like it ain't work at all.

    In Settings>Background agents, the sample agent is On. It should show a toast notification every +-30 minutes, but does not. Btw I've even tried a fresh copy of Visual Studio/SDK...

    I'm not alone, I've found more threads like this on the net, but with no answer. Could anybody help me, or is it a known issue?

    Robert
    Thursday, September 15, 2011 7:36 AM

Answers

  • For those having same problems... The problek solved itself. Today its the second day from deployment of Background agent sample, and the toast notification popped up 4 times. Theres nothing I did, it just started to work. But its still not running every 30mins, but approx 4 times per day, but that may be problem of my beta Mango...
    Friday, September 16, 2011 7:08 PM

All replies

  • Please, if anybody could look at my problem, I'm lost.

    1. I've uninstalled all VS/SDK soft on my PC and downloaded new versions from Microsoft websites...
    2. I've downloaded BackgroundAgent sample
    3. Deployed to emulator and phone, started the app, checked the checkbox for PeriodicTask -> toast notifications working OK
    4. Commented "LaunchForTest" lines, deployed to phone and emulator again, started the app, checked the checkbox for PeriodicTask -> toasts doesn't fire for 1 day now!

    There must be some black magic there!
    Thursday, September 15, 2011 8:22 PM
  • I think I may have cross-posted on another thread, thinking I was responding to this...  Anyway...

    Close the foreground app.  Toast.Show won't fire (even from a background task) when the foregreound app that queued it is currently running.

    Are you trying it with the foreground app closed?

    Thursday, September 15, 2011 9:26 PM
  • Yes I am :-( Been using the phone for a whole day since deploy/app start/checkbox agent start.

    That's wierd, I want it to behave properly too. :-(

    Btw thanks for test!

    Thursday, September 15, 2011 10:13 PM
  • For those having same problems... The problek solved itself. Today its the second day from deployment of Background agent sample, and the toast notification popped up 4 times. Theres nothing I did, it just started to work. But its still not running every 30mins, but approx 4 times per day, but that may be problem of my beta Mango...
    Friday, September 16, 2011 7:08 PM