Book Image

Mastering Cross-Platform Development with Xamarin

By : Can Bilgin, Miljenko Cvjetko, Paulo Ortins, Robert Hellestrae, Craig Dunn
Book Image

Mastering Cross-Platform Development with Xamarin

By: Can Bilgin, Miljenko Cvjetko, Paulo Ortins, Robert Hellestrae, Craig Dunn

Overview of this book

The main goal of this book is to equip you with the required know-how to successfully analyze, develop, and manage Xamarin cross-platform projects using the most efficient, robust, and scalable implementation patterns. This book starts with general topics such as memory management, asynchronous programming, local storage, and networking, and later moves onto platform-specific features. During this transition, you will learn about key tools to leverage the patterns described, as well as advanced implementation strategies and features. The book also presents User Interface design and implementation concepts on Android and iOS platforms from a Xamarin and cross-platform perspective, with the goal to create a consistent but native UI experience. Finally, we show you the toolset for application lifecycle management to help you prepare the development pipeline to manage and see cross-platform projects through to public or private release.
Table of Contents (19 chapters)
Mastering Cross-Platform Development with Xamarin
About the Authors
About the Reviewers

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.


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...