Free Sample
+ Collection

Xamarin Mobile Application Development for Android

Mark Reynolds

Get up to speed with mobile computing with this step-by-step guide to developing and testing an Android app using C# and Xamarin. From first principles to distribution, everything you need is here.
RRP $20.99
RRP $34.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783559169
Paperback168 pages

About This Book

  • Gain an understanding of both the Android and Xamarin platforms
  • Build a working multi-view Android app incrementally throughout the book
  • Work with device capabilities such as location sensors and the camera

Who This Book Is For

If you are a C# developer with a desire to develop Android apps and want to enhance your existing skill set, then this book is for you. It is assumed that you have a good working knowledge of C#, .NET, and object-oriented software development. Familiarity with rich client technologies such as WPF or Silverlight is also helpful, but not required.

Table of Contents

Chapter 1: The Anatomy of an Android App
The Android platform
The Android applications
Chapter 2: Xamarin.Android Architecture
Why Xamarin.Android?
What is Mono?
Mono and Dalvik side by side
The Android bindings design
Development environments
Chapter 3: Creating the Points of Interest App
The sample app
Installing Xamarin.Android
Creating the app
Behind the scenes
Chapter 4: Creating a Data Storage Mechanism
Creating the Point of Interest entity class
Creating the POI storage interface
Implementing the POI storage services
Chapter 5: Adding a List View
Creating the POI ListView layout
Populating the ListView item
Adding actions to ActionBar
Configuring an SD card for the emulator
Running POIApp
Android Device Monitor
Handling row clicks
Chapter 6: Adding a Detail View
Creating the POIDetail layout
Adding navigation to POIDetailActivity
Adding Save and Delete actions
Adding validation
Adding a Delete confirmation prompt
Toasting success
Refreshing POIListActivity
Wrapping up
Chapter 7: Making POIApp Location Aware
Location services
Adding map integration
Chapter 8: Adding Camera App Integration
Picking an integration approach
Permissions and Features
Configuring the Emulator
Extending the data service
Capturing an image from POIDetailActivity
Displaying existing images in POIDetailActivity
Displaying POI images in POIListActivity
Chapter 9: Deploying Your App
App distribution options
Preparing for a release APK
Publishing a signed APK

What You Will Learn

  • Build a multi-view Android application with navigation
  • Utilize the ActionBar for app actions
  • Create a simple JSON-based persistent service to save data locally on the device
  • Lay out content using the LinearLayout, RelativeLayout, and TableLayout layout managers
  • Use a ListView (AdapterView) and Adapter to build a view that is populated by dynamic data
  • Capture the current location of a device and determine the street address
  • Integrate with the map app to display a point of interest
  • Capture and save a photo
  • Test, debug, and deploy an Android app

In Detail

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.

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.

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.

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.


Read More