Book Image

Xamarin Mobile Application Development for Android

By : Mark Reynolds
Book Image

Xamarin Mobile Application Development for Android

By: Mark Reynolds

Overview of this book

<p>Technology trends come and go, but few have generated the excitement, momentum, or long-term impact that mobile computing has. Mobile computing impacts people’s lives at work and at home on a daily basis. Many companies and individual developers are looking to become a part of the movement but are unsure how to best utilize their existing skills and assets. The Xamarin suite of products provides new opportunities to those who already have a significant investment in C# development skills and .NET code bases, and would like to enter into this new, exciting world.</p> <p>This example-oriented guide provides a practical approach to quickly learning the fundamentals of Android app development using C# and Xamarin.Android. It will lead the readers through building an Android app step-by-step with steadily increasing complexity.</p> <p>This book begins with an overview of the Android and Xamarin platforms to provide you with a solid understanding of the environment you will be working in. You will then be gradually walked through building and testing an Android app using C# and the Xamarin.Android product. You will learn the basics of interacting with some of the more interesting aspects of Android devices including location services, the camera, and maps. You will also be given the opportunity to work with three different layout managers to gain an understanding of the various options available for arranging controls and content. The book ends with a discussion on the final steps involved in preparing apps for deployment to the various Android app stores.</p> <p>In a relatively short period of time, developers familiar with C# and rich client technologies such as WPF and Silverlight will be effectively developing, testing, and delivering Android apps.</p>
Table of Contents (16 chapters)
Xamarin Mobile Application Development for Android
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preparing for a release APK


As you may recall from Chapter 1, The Anatomy of an Android App, Android apps are delivered to devices for installation in an Android package format. The following sections discuss topics that should be considered prior to producing a release APK.

Disabling debug

During the development of an application, Xamarin Studio supports debugging Xamarin.Android apps through the use of Java Debug Wire Protocol (JDWP). This is great for development purposes but poses security risks for deployed applications and thus needs to be disabled in released apps.

There are two different ways to accomplish this:

  • Setting in AndroidManifest.xml

  • Setting in AssemblyInfo.cs

AndroidManifest.xml

The following listing shows how to turn off JDWP debugging from the manifest file:

<application
. . .
  android:debuggable="false"
. . .
</application>

AssemblyInfo.cs

The following listing shows how to use a conditional directive to turn JDWP debugging off or on based on the configuration that is...