Updating the tile background without push
In this task, we will update the background of our application tile on a static schedule. This is the simplest form of push notification. The application will provide some eye candy for the user on the home screen by updating the tile background with the NASA daily image.
Getting ready
Create a new project in Visual Studio named DailyTileBackground using the Windows Phone Application template.
How to do it...
Scheduled tile background updates do not require a custom service component, only code on the phone to define the schedule and image source. So, the code for this task will be located in the MainPage.xaml.cs
code-behind file:
1. Add the
using
statement for theMicrosoft.Phone.Shell
namespace.2. Create a new
ShellTileSchedule
type and set its properties:Recurrence:
The typeUpdateRecurrence
has two options:OneTime:
used for single tile updates.Interval:
used for multiple updates at a given interval type.
UpdateInterval:
Only used ifRecurrence
is...