Platform-specific concepts
There are other concepts and network communication methods on Xamarin platforms that are provided by the native runtime and supported by Xamarin.
Permissions
In order for an Android or Windows Phone application to access Internet, the application manifest should declare that the application will need to use the network to access resources.
The permission on Android system is declared using the uses-permission
tag in the manifest node of the XML file:
<uses-permission android:name="android.permission.INTERNET" />
While this declaration will suffice in most use case scenarios, in order to access the current network status or the Wi-Fi status, you must also declare the network state permissions:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
For a Windows phone, the app capability to declare would be ID_CAP_NETWORKING
.
Application manifests for both platforms...