It’s more than likely that a Windows Store app will need to work with data that resides on the Internet. For example, an app may aggregate data from various news sources using RSS feeds. Consuming this type of data in a Windows Store app is very similar to consuming it in an Android app. In this post I’ll show you how to connect your app to the network.
In order for a Windows Store application to access the Internet, it must have the internetClient capability enabled in its package manifest. By default, when you create a new Windows Store application using Visual Studio the internetClient capability is enabled for you. To ensure the capability is enabled do the following:
Double-click the Package.appxmanifest file in Visual Studio’s Solution Explorer.
Click on the Capabilities tab in the Manifest Designer and make sure the checkbox next to Internet (Client) is checked.
|To connect to a network in Android you would need to declare the following manifest permission:|
<uses-permission android:name="android.permission.INTERNET" />
Your Windows Store app can now access network resources.
Before proceeding, it should be noted that there is an important certification requirement regarding the Internet (Client), Internet (Client & Server), and Private Networks (Client & Server) capabilities. If you enable either of these capabilities in your Windows Store applications, then you must do the following in order for your app to pass certification:
Forgetting to provide a policy and provide access to it from both the description page listing in the Windows Store and from the app’s settings is currently the most common certification blocker. The Windows Application Certification Kit does not currently test for this, so you will need to make sure you’ve included it prior to submitting to the store for certification.