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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.