Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Chapter 13. Push Notification > Benefits of Push Notification

Feedback: 0 Comments on this Section

Benefits of Push Notification

Benefits of Push Notification The Microsoft Push Notification Service (MPNS) is designed to be resilient and to expose a persistent channel for sending notifications to Windows Phone devices. Apart from some special cases, the Windows Phone platform does not allow multiple apps to be running at the same time.1 The main reason is that, in most cases, it is not efficient to have background apps consuming device resources, such as maintaining an open connection and sending data over the wire. Network activity results in high power consumption and decreased battery life. 1 Background tasks allow an app to run in the background periodically for short periods. For more information, see Chapter 27, “Scheduled Actions.” Note By battery life I mean the amount of time a device runs before it requires a recharge. Conversely, battery lifespan means the total amount of time a battery lasts before it is discarded and replaced with a new battery. Push notification reduces power consumption in several ways; most notably it uses a single shared network connection, eliminating the need for private persistent open connections. If an app needs to be running merely to receive updates from the cloud, a better approach is to use push notification. The push notification model has the following benefits: • Offline capability—Windows Phone apps should be designed to be tolerant of interruptions as they may be deactivated or terminated at any time. Push notification allows the user to act on some information, even when your app is not running. • Notification aggregation—Multiple notifications for different apps can be pushed at the same time. • Notification prioritization—Notifications can be assigned a priority, which affects when the notification is delivered. This control allows a developer to assign lower priorities to those notifications that do not require immediate attention, thereby reducing the device’s network activity. • Connection pooling—It is more efficient to use a single shared network connection than to have each app owning its own connection. • Small message size—Notifications are designed to carry a small payload. This forces you to think carefully about what information is really necessary to be conveyed. • Deterministic behavior—Tile and toast notifications use a well-defined format with a fixed set of data properties, which allows the OS to present them automatically. • Eliminates polling—Apps that want to receive messages from a cloud service without the use of push notification must periodically poll the cloud service. Push notification eliminates the need for custom network communication code and for private persistent open connections.

You are currently reading a free preview of this book.


Sign up for a
Safari Library subscription
to access Rough Cuts.


Subscribe Now