Book Image

Windows Phone 7 Silverlight Cookbook

By : Jonathan Marbutt, Robb Schiefer
Book Image

Windows Phone 7 Silverlight Cookbook

By: Jonathan Marbutt, Robb Schiefer

Overview of this book

Silverlight has revolutionized development using Microsoft technologies. It is an excellent tool for mobile application development. The XAML-based markup and familiar C# code are the perfect combination for building apps efficiently and with minimum hassle.Packed full of recipes containing comprehensive instructions for the tasks required to build modern compelling smartphone apps using Silverlight.Starting with application design and architecture, you will quickly move on to more technical features and APIs you can implement to make your app stand out. You will use the Camera API to scan barcode, location services to pinpoint the user’s GPS coordinates and accelerometer to provide feedback based on movement of the phone. All of these features can be provided in a slick user interface through the power of Silverlight. Animations, behaviors and XAML provide all you need and more.
Table of Contents (18 chapters)
Windows Phone 7 Silverlight Cookbook
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a service to send notifications


In this recipe, you will create the application server which will provide push notifications for a surf updates phone app. The service will allow users to register for notifications and periodically send updates which will update the phone applications start tile. The application start tile has three components which can be edited: background, title, and count. We will be editing the title and count. We will set the background statically.

Getting ready

We will use a WCF service project for the application server. Create a project named SurfTileNotifications.Service using the WCF Service Library project template.

How to do it...

The WCF service will have two service methods, namely, GetIslandInfo and RegisterForNotifications.

Note

We will be using the Surf Observations RSS feed from the National Weather Service website,http://www.prh.noaa.gov/hnl/xml/Oahu.OMR.HFO.xml, for live surf updates.

The WCF service will read this data feed, parse it, and pass it to...