0

I'm using this code to push notifications:

        protected override void OnInvoke(ScheduledTask task)
        {
            //TODO: Add code to perform your task in background

            string toastMessage = "Periodic task running.";

            ShellToast toast = new ShellToast();
            toast.Title = "Background Agent Sample";
            toast.Content = toastMessage;
            toast.Show();




#if DEBUG
            ScheduledActionService.LaunchForTest(
                task.Name, TimeSpan.FromSeconds(30));
#endif


            NotifyComplete();
        }

The shell toast works great. The problem is that when I use

ShellTile tile = Shelltilve.ActiveTiles.First();

I can't find the First Method.

I'm using a Windows Phone 8 if that helps. I searched and I found that it works, but haven't been able to do it with my code.

hat
  • 781
  • 2
  • 14
  • 25
Ibraheem Al-Saady
  • 854
  • 3
  • 14
  • 30

1 Answers1

1

Have you added

using System.Linq;

to your code file?

ZombieSheep
  • 29,603
  • 12
  • 67
  • 114