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

Chapter 4. Creating a Data Storage Mechanism

We now turn our attention to data storage requirements; we need a way to store and retrieve Point of Interest (POI) data. This chapter covers the following topics:

  • Approaches to data storage solutions

  • Creating the POI entity class

  • Creating the POI data storage interface

  • Implementing the POI data storage service

  • Using Xamarin.Android unit tests to support development

Data storage solutions fall into two general categories, web services and local storage. While many real-world mobile apps rely on web services, we will focus on a local storage solution for a couple of reasons. First, it eliminates the need to maintain a hosted service for the example to work, and second, we simply do not have sufficient time to adequately deal with creating and accessing a web service solution in this book.

There are a number of solutions that can be used for storing data locally. SQLite is a lightweight transactional database engine that is delivered with the Android platform...