Xamarin Mobile Development for Android Cookbook

Over 80 hands-on recipes to unleash full potential for Xamarin in development and monetization of feature-packed, real-world Android apps

Xamarin Mobile Development for Android Cookbook

Cookbook
Matthew Leibowitz

Over 80 hands-on recipes to unleash full potential for Xamarin in development and monetization of feature-packed, real-world Android apps
$39.99
$49.99
RRP $39.99
RRP $49.99
eBook
Print + eBook

Instantly access this course right now and get the skills you need in 2017

With unlimited access to a constantly growing library of over 4,000 eBooks and Videos, a subscription to Mapt gives you everything you need to learn new skills. Cancel anytime.

Preview in Mapt

Book Details

ISBN 139781784398576
Paperback456 pages

Book Description

Xamarin is used by developers to write native iOS, Android, and Windows apps with native user interfaces and share code across multiple platforms not just on mobile devices, but on Windows, Mac OS X, and Linux.

Developing apps with Xamarin.Android allows you to use and re-use your code and your skills on different platforms, making you more productive in any development. Although it’s not a write-once-run-anywhere framework, Xamarin provides native platform integration and optimizations. There is no middleware; Xamarin.Android talks directly to the system, taking your C# and F# code directly to the low levels.

This book will provide you with the necessary knowledge and skills to be part of the mobile development era using C#. Covering a wide range of recipes such as creating a simple application and using device features effectively, it will be your companion to the complete application development cycle.

Starting with installing the necessary tools, you will be guided on everything you need to develop an application ready to be deployed. You will learn the best practices for interacting with the device hardware, such as GPS, NFC, and Bluetooth. Furthermore, you will be able to manage multimedia resources such as photos and videos captured with the device camera, and so much more! By the end of this book, you will be able to create Android apps as a result of learning and implementing pro-level practices, techniques, and solutions. This book will ascertain a seamless and successful app building experience.

Table of Contents

Chapter 1: Working with Xamarin.Android
Introduction
Creating Xamarin.Android projects
Creating user interface layouts
Creating an options menu
Supporting previous Android versions
Adding an action bar
Navigating with the action bar
Adding action bar action items
Creating contextual action mode menu
Creating contextual action mode menus
Sharing code with other platforms
Chapter 2: Showing Views and Handling Fragments
Introduction
Using custom views with layouts
Creating and using fragments
Preserving view and fragment state
Navigating between fragments
Fragments and the action bar
Animating fragment navigation
Animating view and object properties
Animating views on the UI
Adding a navigation drawer with fragments
Applying local styles and global themes
Chapter 3: Managing App Data
Introduction
Storing data with SharedPreferences
Using files and the filesystem
Reading bundled assets and resources
Parsing, processing, and generating XML
Accessing data with ADO.NET
Accessing data with SQLite.NET
Encrypting databases with SQLCipher
Consuming content providers
Creating content providers
Backing up preferences and files to the cloud
Backing up data to the cloud
Chapter 4: Presenting App Data
Introduction
Implementing a ListView
Using a SimpleAdapter
Using custom ListView items
Using a BaseAdapter with arbitrary data
Using a CursorAdapter
Optimizing the ListView
Enabling fast scrolling
Using section indexes
Integrating app searchability
Chapter 5: Communicating with the Outside World
Introduction
Consuming REST services with HttpClient
Obtaining a network state
Handling network state changes
Using DownloadManager
Accessing Bluetooth
Transferring data via Bluetooth
Receiving NFC events
Writing NFC tags
Transferring data via NFC
Obtaining location coordinates and addresses
Chapter 6: Using Background Tasks
Introduction
Asynchronous tasks
Starting services
Stopping services
Handling simultaneous service requests
Starting services automatically
Communicating with running services
Critical services
Chapter 7: Notifying Users
Introduction
Toasts
Alert dialogs
Alert fragments
Embedded alert fragments
Selection alerts
The notification builder
Ongoing notifications
Custom notification views
Push notifications
Chapter 8: Interacting with Other Apps
Introduction
Starting app components
Launching other apps
Obtaining data from activities
Using BroadcastReceivers
Scheduling tasks
Making phone calls
Intercepting phone calls
Sending SMS messages
Receiving SMS messages
Chapter 9: Presenting Multimedia
Introduction
Playing audio
Playing audio in the background
Managing the audio volume
Recording an audio
Playing a video
Custom video controls
Using the camera
Creating a camera app
Handling high-resolution images
Drawing on the canvas of a View
Drawing on the canvas of a SurfaceView
Chapter 10: Responding to the User
Introduction
Responding to simple touches
Responding to scroll gestures
Responding to manipulation gestures
Detecting rotate gestures
Responding to custom user gestures
Listening to sensor data
Listening for sensor triggers
Discovering the environment
Detecting device shakes
Chapter 11: Connecting to Wearables
Introduction
Introducing wearable notifications
Customizing wearable notifications
Creating wearable apps
Creating always-on wearable apps
Creating dynamic always-on wearable apps
Communicating with wearables
Building watch faces
Configuring watch faces
Chapter 12: Adding In-App Billing
Introduction
Preparing for in-app billing
Integrating in-app billing
Listing available products
Purchasing products
Listing purchased products
Consuming purchases
Chapter 13: Publishing Apps
Introduction
Protecting the content
Protecting the code
Preparing the app package
Shrinking the app package
Creating the app package
Uploading the app package
Adding preview testers
Releasing for production
Updating the app

What You Will Learn

  • Install and use Xamarin.Android with Xamarin Studio and Visual Studio
  • Design an app’s user interface for multiple device configurations
  • Store and protect data in databases, files, and on the cloud
  • Utilize lists and collections to present data to the user
  • Communicate across the network using NFC or Bluetooth
  • Perform tasks in the background and update the user with notifications
  • Capture and play multimedia, such as video and audio, with the camera
  • Implement In-App Billing and Expansion Files and deploy to the store

Authors

Table of Contents

Chapter 1: Working with Xamarin.Android
Introduction
Creating Xamarin.Android projects
Creating user interface layouts
Creating an options menu
Supporting previous Android versions
Adding an action bar
Navigating with the action bar
Adding action bar action items
Creating contextual action mode menu
Creating contextual action mode menus
Sharing code with other platforms
Chapter 2: Showing Views and Handling Fragments
Introduction
Using custom views with layouts
Creating and using fragments
Preserving view and fragment state
Navigating between fragments
Fragments and the action bar
Animating fragment navigation
Animating view and object properties
Animating views on the UI
Adding a navigation drawer with fragments
Applying local styles and global themes
Chapter 3: Managing App Data
Introduction
Storing data with SharedPreferences
Using files and the filesystem
Reading bundled assets and resources
Parsing, processing, and generating XML
Accessing data with ADO.NET
Accessing data with SQLite.NET
Encrypting databases with SQLCipher
Consuming content providers
Creating content providers
Backing up preferences and files to the cloud
Backing up data to the cloud
Chapter 4: Presenting App Data
Introduction
Implementing a ListView
Using a SimpleAdapter
Using custom ListView items
Using a BaseAdapter with arbitrary data
Using a CursorAdapter
Optimizing the ListView
Enabling fast scrolling
Using section indexes
Integrating app searchability
Chapter 5: Communicating with the Outside World
Introduction
Consuming REST services with HttpClient
Obtaining a network state
Handling network state changes
Using DownloadManager
Accessing Bluetooth
Transferring data via Bluetooth
Receiving NFC events
Writing NFC tags
Transferring data via NFC
Obtaining location coordinates and addresses
Chapter 6: Using Background Tasks
Introduction
Asynchronous tasks
Starting services
Stopping services
Handling simultaneous service requests
Starting services automatically
Communicating with running services
Critical services
Chapter 7: Notifying Users
Introduction
Toasts
Alert dialogs
Alert fragments
Embedded alert fragments
Selection alerts
The notification builder
Ongoing notifications
Custom notification views
Push notifications
Chapter 8: Interacting with Other Apps
Introduction
Starting app components
Launching other apps
Obtaining data from activities
Using BroadcastReceivers
Scheduling tasks
Making phone calls
Intercepting phone calls
Sending SMS messages
Receiving SMS messages
Chapter 9: Presenting Multimedia
Introduction
Playing audio
Playing audio in the background
Managing the audio volume
Recording an audio
Playing a video
Custom video controls
Using the camera
Creating a camera app
Handling high-resolution images
Drawing on the canvas of a View
Drawing on the canvas of a SurfaceView
Chapter 10: Responding to the User
Introduction
Responding to simple touches
Responding to scroll gestures
Responding to manipulation gestures
Detecting rotate gestures
Responding to custom user gestures
Listening to sensor data
Listening for sensor triggers
Discovering the environment
Detecting device shakes
Chapter 11: Connecting to Wearables
Introduction
Introducing wearable notifications
Customizing wearable notifications
Creating wearable apps
Creating always-on wearable apps
Creating dynamic always-on wearable apps
Communicating with wearables
Building watch faces
Configuring watch faces
Chapter 12: Adding In-App Billing
Introduction
Preparing for in-app billing
Integrating in-app billing
Listing available products
Purchasing products
Listing purchased products
Consuming purchases
Chapter 13: Publishing Apps
Introduction
Protecting the content
Protecting the code
Preparing the app package
Shrinking the app package
Creating the app package
Uploading the app package
Adding preview testers
Releasing for production
Updating the app

Book Details

ISBN 139781784398576
Paperback456 pages
Read More

Read More Reviews