Plan for network connectivity
Throughout the course of a single day, a Windows 8 device may encounter a multitude of networks, each with its own requirements and limitations. Your Windows Store app needs to ensure a good user experience regardless of changes to the availability, integrity, or cost of a network connection.
Declaring the right network capabilities allows you to scope your app's exposure to networks. More importantly, they enforce network access restrictions, which helps to protect users and their Windows 8 devices from malicious attacks. While a network capability must be declared in order have access to any network resources, it is important to think beyond the basic need for connectivity. Think about specific user scenarios and select the most appropriate network capability.
For more details, see How to set network capabilities.
Think about the type of connections or services your app requires and use the appropriate technology. For example, your app can communicate with other devices over the Internet or private networks. Establish local network connections using Sockets or, for web connections, use HTTP and WebSockets. Once your app has made a connection, other features can enable your app to access Live services, download files in the background, display syndicated web content, or even access the cloud with Azure mobile services.
For more details, see Connecting to networks and web services.
In addition to planning app behavior for unpredictable network conditions in a fixed location, user scenarios must also consider frequent changes to app and device states, or network changes brought about by changes to a user's physical location. Each of these things can directly impact both the quality and availability of a connection. To maintain a high-quality user experience in these increasingly common situations, your app should not only be aware of changes to available connections, but also notify the user of important changes, maintain a connection for tasks that depend on it, or gracefully end a task that cannot be completed as a result of connection issues.
For more details, see Connection state and cost management.
Declaring the right network capabilities helps to provide a secure and transparent connected experience, but there are other things you need to consider. Does your app have access to sensitive user information? Is there an authentication and secure connection requirement in your user scenarios? Think about security considerations as you plan how your app will behave while establishing connections or working with web services.
For more details, see How to secure connections and authenticate requests.
The cost frequently associated with mobile broadband networks is an important consideration for both frequent travelers and the everyday user. Many mobile broadband networks limit a user's activity to a set data capacity (or data cap). In many scenarios, metered network use that exceeds this data cap incurs additional charges. When planning for cost scenarios take the burden off of the user and let your app identify when a connection may incur costs, and how to change its behavior to avoid or reduce charges.
For more details, see Quickstart: Managing metered network cost constraints.
Note Your app must protect users from unintentional large data transfers over metered networks.. See section 4.5 of the Certification requirements for more information.
Build date: 9/19/2013