Keeping Payment Instruments Up-To-Date with a Background Agent

Background agents allow your app to perform a task both while your app is running or not running. For more information on background agents, see Chapter 32, “Conducting Background Activities with Scheduled Actions.”

Perform the following steps to create a Background Agent for your Wallet-enabled app:

1. Create a new Windows Phone Class Library project. Right-click the solution node in the Visual Studio Solution Explorer and select Add/New Project. Select the project type from the Windows Phone node in the Add New Project dialog.

2. Create a new class and add the following using statement to the top of the file:

using Microsoft.Phone.Wallet;

3. Make your class a subclass of WalletAgent ...

Get Windows® Phone 8 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.