Book description
Develop, test, and deliver fully-featured Android applications using Xamarin
About This Book
- Build and test multi-view Android applications using Xamarin.Android
- Work with device capabilities such as location sensors and the camera
- A progressive, hands-on guide to develop stunning Android applications using Xamarin
Who This Book Is For
If you are a C# developer who wants to develop Android apps and enhance your existing skill set, then this book is ideal for you. Good working knowledge of C#, .NET, and object-oriented software development is assumed.
What You Will Learn
- Build a multi-view, orientation-aware Android application with navigation
- Lay out content using the LinearLayout, RelativeLayout, and TableLayout layout managers
- Use a ListView (AdapterView) and Adapter to build a view that is populated from server data
- Consume REST web service to perform GET, UPDATE, DELETE operation
- Use Android SQLite for data persistence and caching
- Capture the current location of a device, determine the street address, and integrate with the map app
- 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 learn the fundamentals of Android app development using C# and Xamarin.Android. It will lead you through building an Android app step-by-step with steadily increasing complexity.
Beginning with an overview of the Android and Xamarin platforms to provide you with a solid understanding of the underlying platform, we gradually walk through building and testing a Points of Interest Android app using C# and the Xamarin.Android product. You will learn to create ListView and add detail view to your Android application. You will handle application behaviors on orientation changes, before learning the different techniques to manage resources and layouts to support multiple screen sizes. You will then access a SQLite database in a cross-platform way and add location features to your application. Finally, you will add camera integration to your application and deploy your app to the various Android app stores.
Style and approach
An example-oriented, comprehensive guide to gain an understanding of both the Android and Xamarin platforms.
Table of contents
-
Xamarin Mobile Application Development for Android Second Edition
- Table of Contents
- Xamarin Mobile Application Development for Android Second Edition
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Preface
-
1. The Anatomy of an Android App
- The Android platform
- The application framework
-
The building blocks of the Android application
- The Android packages (.apk)
- The application manifest
- Activities
- Fragments
- Services
- Content providers
- Broadcast receivers
- Views and ViewGroups
- Declarative versus programmatic View creation
- User interface widgets
- Common layouts
- Adapter layouts
- XML layout files
- Using XML layouts from activities
- Intents
- Resources
- The R.java file
- Summary
- 2. The Xamarin.Android Architecture
-
3. Creating the Points Of Interest App
- The sample POIApp
- Installing Xamarin.Android
- Installing platforms and tools
- Creating Android Virtual Devices
- Cloning a virtual device
- Speeding up the Android emulator
- Creating the POI app
- The Xamarin Studio IDE
- The Project Options view
- The Xamarin Studio layout designer
- Setting the app icon and package name
- The launcher activity
- Running and debugging the app
- Debugging with an Android device
- The AndroidManifest.xml file
- Summary
-
4. Adding a List View
- Creating the POI ListView layout
- Creating POIListActivity
- Creating the POI list row layout
- Creating the PointOfInterest apps entity class
- Populating the ListView item
- Creating POIListViewAdapter
- Populating row Views
- Hooking up POIListViewAdapter
- Consuming the web service
- Adding actions to ActionBar
- Defining the menu XML file
- Setting menus in OnCreateOptionsMenu()
- Handling selection in OnOptionsItemSelected()
- Handling the ListView click event
- Handling no network condition
- Toast
- Summary
-
5. Adding a Details View
- Creating the POIDetail layout
- Creating POIDetailActivity
- Adding navigation to POIDetailActivity
- Receiving the data in POIDetailActivity
- Populating user interface widgets
- Adding the save and delete actions
- Adding the save and delete actions in POIService
- Creating SavePOI()
- Creating DeletePOI()
- Adding validation
- Refreshing POIListActivity
- Summary
- 6. Making Your App Orientation-aware
-
7. Designing for Multiple Screen Sizes
- An introduction to Android tablets
- Creating an Android tablet emulator
- An introduction to fragments
- Making POIApp compatible with Android tablets
- Using fragments for displaying POIDetails
- Using the list fragment for displaying the POI list
- Creating a multi-pane layout for tablets
- Updating the POIApp to support the multi-pane split layout
- Working with DialogFragment
- Fragments for older Android devices
- Handling configuration changes with fragments
- Summary
- 8. Creating Data Storage Mechanisms
- 9. Making POIApp Location Aware
- 10. Adding the Camera App Integration
- 11. Publishing an App to the App Store
- Index
Product information
- Title: Xamarin Mobile Application Development for Android - Second Edition
- Author(s):
- Release date: August 2015
- Publisher(s): Packt Publishing
- ISBN: 9781785280375
You might also like
book
Xamarin Mobile Development for Android Cookbook
Over 80 hands-on recipes to unleash full potential for Xamarin in development and monetization of feature-packed, …
book
Xamarin: Cross-Platform Mobile Application Development
Master the skills required to develop cross-platform applications from drawing board to app store(s) using Xamarin …
book
Xamarin Mobile Application Development: Cross-Platform C# and Xamarin.Forms Fundamentals
Xamarin Mobile Application Development is a hands-on Xamarin.Forms primer and a cross-platform reference for building native …
book
Beginning Xamarin Development for the Mac: Create iOS, watchOS, and Apple tvOS apps with Xamarin.iOS and Visual Studio for Mac
Develop apps for the iPhone, iPad, and Apple wearables using Visual Studio for the Mac. Learn …