Question

I'm getting an InvalidOperationException when using the following code to create a ShellTileSchedule:

ShellTileSchedule sch;
public void UpdateTile()
{
    sch = new ShellTileSchedule();
    sch.Recurrence = UpdateRecurrence.Interval;
    sch.Interval = UpdateInterval.EveryHour;
    sch.StartTime = DateTime.Now;
    sch.RemoteImageUri = new Uri(@"http://winmilk.julianapena.com/Tile3.png");

    sch.Start();
}

The exception occurs specifically when calling sch.Start();. It's also happening whether I use interval or one-time updates.

Anyone have any idea on why this is happening?

Thanks in advance!

Was it helpful?

Solution

Doh, found the answer. Didn't add

<Capability Name="ID_CAP_PUSH_NOTIFICATION"/>

to the WMAppManifest.xml file.

A bit misleading, because the documentation for ShellTileSchedule says that it's updating the tile "without push notifications". At least it works now :)

OTHER TIPS

I have had this same issue from not getting the properties of my schedule right.

If i set the schedule to "only update once" and then set its "interval" it errors.

If i remove the interval this issue goes away.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top