0345 4506120

M40540 Build Android apps with C# and .NET using the Xamarin tools for Visual Studio

This course takes experienced C# .NET developers through the entire Xamarin.Android mobile development process, using the Xamarin tools for Visual Studio. Topics range from the basics such as Android activities, intents, and fragments and then move to more advanced topics such as consuming REST-based services, ListViews, data storage with SQLite and publishing to the Google Play store.

Target Audience

This course is intended for developers with at least basic C# knowledge with 6-12 months of .NET experience. Students should own and/or have used an Android device and be familiar with the paradigms of the platform.

Hardware/Software requirements:

- A Mac running on the latest OS, with Visual Studio for Mac installed or a Windows 10 PC with Visual Studio 2017 and the Mobile development with .NET workload installed

- An Android device is highly recommended

Learning Objectives

  • Build Android applications in C# using the Xamarin tools for Visual Studio.
  • Design multiscreen applications using native Android controls and AXML layouts.
  • Access REST services, store data locally using a SQLite database, and customize the data presentation using native controls and custom listview cells.

Pre-Requisites

Basic C# knowledge with 6-12 months of .NET experience

Course Content

Module 1: Getting Started with Xamarin (XAM101)

By the end of this module, you will be able to choose the Xamarin approach that is right for you. You will also set up your development machine and run an app on Windows, the iOS simulator, and an Android emulator.

Lessons for module 1

  • Define the state of mobile technology today
  • Discuss mobile app trends
  • Identify approaches to development
  • Discover the Xamarin Approach
  • Set up your development environment

Lab : Building Cross Platform Applications with Xamarin

  • Demonstration - Cross Platform Applications with Xamarin
  • Demonstration – View a Xamarin.Forms Project
  • Setup Validation – Validate your development environment ready

After completing module 1, students will be able to:

  • Identify mobile development trends
  • Identify the different approaches to mobile development
  • Describe the Xamarin approach to development
  • Set up and validate their development environment

Module 2: Introduction to Xamarin.Android (AND101)

During this module you will create a new project in Visual Studio, code the user interface and behavior for an Activity, build the project, and test it on an Android emulator. You'll also see how to keep your development environment up-to-date as new Android versions are released.

Lessons for module 2

  • Create a Xamarin.Android project
  • Decompose an app into Activities
  • Build an Activity's UI
  • Write an Activity's behavior
  • Update your Android SDK

Lab : Create a Xamarin.Android application with Views, layouts and behavior

  • Create a Xamarin.Android Project
  • Add views to a layout file manually and with the Designer
  • Implement an Activity’s behavior and run your app in an emulator
  • Update the Tools and SDK Platform

After completing module 2, students will be able to:

  • Create a new Xamarin.Android project
  • Define the concept of an Activity
  • Decompose an app into Activities
  • Add Views to a Layout in XML
  • Use the Designer tool
  • Designate a Main Activity
  • See how the Main Activity is listed in the app Manifest
  • Load an Activity's UI
  • Access Views from code
  • Review native Android development
  • Understand the Xamarin.Android development process
  • Update your Android Tools
  • Update your Android Platform SDK

Module 3: Activities and Intents (AND102)

In this module you will code the core patterns that make Activities work together. You will see how to start Activities, pass arguments, and retrieve results. You will also see how to launch standard Android Activities such as the camera or the web browser.

Lessons for module 3

  • Start an Activity in your .apk
  • Finish an Activity
  • Pass arguments to an Activity
  • Get Activity results
  • Start a system Activity

Lab : Create an app with collaborating Activities

  • Explore the completed lab exercise
  • Start an Activity in your .spk
  • Programmatically end an Activity
  • Pass arguments to an Activity
  • Get Activity Results
  • Launch a system Activity

After completing module 3, students will be able to:

  • Create an explicit Intent
  • Start an Activity
  • Implement Stack Navigation
  • Programmatically finish an Activity
  • Load a Bundle of arguments into an Intent
  • Retrieve the arguments in the target Activity
  • Pass and return a request code and Bundle
  • Retrieve results
  • Create an implicit Intent
  • Load Intent Action, Data, and Extras
  • Verify that Android found an Activity that matches your implicit Intent

Module 4: List Views and Adapters in Android (AND110)

In this module you will code an Adapter to populate the ListView and handle item-selection events to implement a simple master-detail pattern. You will also see two advanced tasks: layout recycling with view holders to boost performance and fast scrolling with section indexers to help the user navigate large data sets.

Lessons for module 4

  • Handle list-item click events
  • Implement a custom adapter
  • Use layout recycling and the view-holder pattern

Lab : Use an Adapter to populate a ListView and then customize it to boost efficiency

  • Populate a ListView using an ArrayAdapter
  • Handle list-item click events
  • Implement a custom adapter
  • Use layout recycling and the view-holder pattern
  • Enable fast scrolling and a code a section indexer

After completing module 4, students will be able to:

  • Add a ListView to a UI
  • Use ArrayAdapter to populate a ListView
  • Identify the limitations of ArrayAdapter
  • Subscribe to the ListView.ItemClick event
  • Determine which list items were clicked
  • Reuse inflated layouts to reduce memory usage
  • Cache view references to increase performance
  • Enable ListView fast scrolling

Module 5: RecyclerView and CardView (AND115)

User RecyclerView to display a data collection and CardView to host the visualization of each element.

Lessons for module 5

  • Display a collection using RecyclerView
  • Update the UI after a data change
  • Respond to user actions
  • Show data in a CardView

Lab : Implementing web apps

  • Group Exercise: Create a RecyclerView
  • Group Exercise: Set a layout manager
  • Group Exercise: Code an item-layout file
  • Group Exercise: Code a view holder
  • Group Exercise: Code an adapter
  • Add an item-click event
  • Group Exercise: Show data in a CardView

After completing module 5, students will be able to:

  • Create a RecyclerView
  • Select a layout manager
  • Code an item-layout file
  • Code a view holder
  • Code an adapter
  • Notify RecyclerView when data changes
  • Determine the position of the clicked item
  • Detect user actions
  • Report user actions via an event
  • Decide whether to use CardView
  • Add the CardView support library
  • Use CardView in an item-layout file

Module 6: Consuming REST-based Web Services (XAM150)

In this module, you will learn to consume REST-based web services with HttpClient using both the managed networking stack and the platform-specific handlers that boost performance. You will also learn some common strategies for dealing with the unique challenges that mobile devices face when communicating over the network.

Lessons for module 6

  • Obtain the device’s network capabilities
  • Introduce REST
  • Consume REST services with Xamarin

Lab : Use, consume and communicate with REST services

  • Determine the network connectivity
  • Communicate with a Book Service
  • Demonstration: Leverage the native platform network stack

After completing module 6, students will be able to:

  • Determine if the device has a connection
  • Obtain the device’s connection type
  • Determine when network availability changes
  • Identify REST services
  • Utilize URLs in REST
  • Describe guidelines for using REST
  • Identify REST services
  • Utilize URLs in REST
  • Describe guidelines for using REST
  • Customize the HttpClient handler
  • Leverage platform network stacks
  • Use App Transport Security on iOS

Module 7: Working with SQLite and Mobile Data (XAM160)

During this module you will learn to identify the proper location for your database file and how to insert, update, retrieve, and delete data efficiently using asynchronous I/O calls.

Lessons for module 7

  • Choose a data storage strategy
  • Store data locally with SQLite
  • SQLite asynchronously

Lab : Utilize SQLite to store and access data

  • Determine your database file path
  • Add SQLite.Net to your projects
  • Access a SQLite database with SQLite.Net
  • Access a SQLite database using asynchronous methods

After completing module 7, students will be able to:

  • Identify data storage options
  • Select a storage location
  • Get the storage path for each platform
  • Add a SQLite Portable Class Library to the project
  • Define SQLite table schema using attributes
  • Create and connect to a SQLite database
  • Perform basic CRUD operations
  • Refactor database connection to use SQLiteAsyncConnection
  • Refactor table creation to use Async counterpart
  • Refactor CRUD operations to use Async counterparts

Module 8: Toolbar and App Bar (AND180)

In this module you will learn to create a Toolbar, populate it from an XML menu file, and respond to item-click events. You will also learn how to integrate a Toolbar into your Activity by setting it as the Activity's app bar.

Lessons for module 8

  • Add a Toolbar to an Activity
  • Populate Toolbar Actions from an XML menu file
  • Use a Toolbar as an Activity's app bar
  • Set a navigation icon on an app bar

Lab : Create and populate a Toolbar and set it as the Activity's AppBar

  • Add a Toolbar to an Activity
  • Populate Toolbar Actions from an XML menu file
  • Add a checkable submenu
  • Use a Toolbar as an Activity’s app bar
  • Set a navigation icon on an app bar

After completing module 8, students will be able to:

  • Add a ListView to a UI
  • Use ArrayAdapter to populate a ListView
  • Identify the limitations of ArrayAdapter
  • Subscribe to the ListView.ItemClick event
  • Determine which list items was clicked
  • Inflate a layout file with LayoutInflater
  • Code a custom Adapter
  • Reuse inflated layouts to reduce memory usage
  • Cache view references to increase performance
  • Enable ListView fast scrolling
  • Implement ISectionIndexer on a custom Adapter

Module 9: Android Navigation (AND205)

This module teaches you how to code three common navigation patterns: tab, gestural, and drawer. It also includes guidelines to help you decide which pattern is appropriate for your app as well as teaches you to use fragments and FrameLayout.

Lessons for module 9

  • Use Fragment and FrameLayout to swap views
  • Implement tab navigation with TabLayout
  • Implement gestural navigation with ViewPager
  • Combine gestural and tab navigation
  • Implement drawer navigation with DrawerLayout

Lab : Build three common navigation patterns in Xamarin.Android

  • Use Fragment and FrameLayout to swap views
  • Implement tab navigation with TabLayout
  • Implement gestural navigation with ViewPager
  • Combine gestural and tab navigation
  • Implement drawer navigation with DrawerLayout

After completing module 9, students will be able to:

  • Add a Fragment to a FrameLayout dynamically
  • Include a TabLayout in your UI
  • Add tabs using code-behind
  • Add tabs using XML
  • Respond when a tab is tapped
  • Add a ViewPager to the UI
  • Code an adapter to supply the ViewPager with Fragments
  • Use a ViewPager to populate a TabLayout with tabs
  • Use DrawerLayout to display a drawer menu
  • Use an app bar navigation button to open the drawer
  • Code an XML file for a menu
  • Swap content when a menu is clicked

Module 10: Android Services (AND210)

This module teaches you to define a Service, use start/stop methods to explicitly control its lifecycle, and use bind/unbind methods to automatically destroy the instance when the last client has unbound.rform long-running operations using Android services.

Lessons for module 10

  • Handle list-item click events
  • Implement a custom adapter
  • Use layout recycling and the view-holder pattern

Lab : Use an Adapter to populate a ListView and then customize it to boost efficiency

  • Populate a ListView using an ArrayAdapter
  • Handle list-item click events
  • Implement a custom adapter
  • Use layout recycling and the view-holder pattern
  • Enable fast scrolling and a code a section indexer

After completing module 10, students will be able to:

  • Add a ListView to a UI
  • Use ArrayAdapter to populate a ListView
  • Identify the limitations of ArrayAdapter
  • Subscribe to the ListView.ItemClick event
  • Determine which list items was clicked
  • Reuse inflated layouts to reduce memory usage
  • Cache view references to increase performance
  • Enable ListView fast scrolling

Module 11: Google Maps (AND230)

During this module will learn how to use the Google Play Services APIs to add a map to your app. You will perform the entire setup process: register your app in the Google APIs Console, create an API key, and add your API key to your app's manifest. You will then use MapView and MapFragment to visualize map data in your app's UI. Finally, you will write code to add markers to the maps and adjust the viewpoint position and map perspective.

Lessons for module 11

  • Choose a map display strategy
  • Configure an application to use Google Maps
  • Display a map in your application
  • Add markers to a Google Map
  • Adjust the map position and perspective

Lab : Create an app that shows a Google Map with markers and viewpoints

  • Group Exercise: Locate your keystore and SHA1 fingerprint
  • Group Exercise: Obtain a Google API key for Google Maps V2
  • Add support for Google Maps
  • Add markers to your map
  • Change your map viewpoint

After completing module 11, students will be able to:

  • Launch the default map application
  • Identify the components of Google Play Services
  • Install Google Play Services on an Android emulator
  • Create an API key
  • Register your application with Google Maps API
  • Set required permissions to use location in your application
  • Add a Map UI into your app
  • Configure the map view
  • Display current location on the map
  • Add map markers
  • Display marker details
  • Programmatically interact with the map
  • Update the map viewpoint
  • Animate camera position changes

Module 12: Touch in Android (AND205)

This module teaches you how to code three common navigation patterns: tab, gestural, and drawer. It also includes guidelines to help you identify which pattern is most appropriate for your app.

Lessons for module 12

  • Use Fragment and FrameLayout to swap views
  • Implement tab navigation with TabLayout
  • Implement gestural navigation with ViewPager
  • Combine gestural and tab navigation
  • Implement drawer navigation with DrawerLayout

Lab : Build three common navigation patterns in Xamarin.Android

  • Use Fragment and FrameLayout to swap views
  • Implement tab navigation with TabLayout
  • Implement gestural navigation with ViewPager
  • Combine gestural and tab navigation
  • Implement drawer navigation with DrawerLayout

After completing module 12, students will be able to:

  • Add a Fragment to a FrameLayout dynamically
  • Include a TabLayout in your UI
  • Add tabs using code-behind
  • Add tabs using XML
  • Respond when a tab is tapped
  • Add a ViewPager to your UI
  • Code an adapter to supply the ViewPager with Fragments
  • Use a ViewPager to populate a TabLayout with tabs
  • Use DrawerLayout to display a drawer menu
  • Use an app bar navigation button to open the drawer
  • Code an XML file for your menu
  • Swap content when your menu is clicked

Module 13: Gestures (AND231)

In this module you use Android's gesture recognizers to respond to user gestures. You will learn the full list of standard Android gestures and see how to write your own recognizer to support a custom rotation gesture.

Lessons for mofule 13

  • Determine the current location
  • Search for points of interest around the device

Lab : Implementing and managing Azure AD synchronization

  • Group Exercise: Setup the Google Maps API key
  • Working with the Location Manager
  • Identifying a provider based on criteria
  • Group Exercise: Adding support for LocationServices
  • Using Geocoder to perform reverse geocoding
  • Using Geocoder to find specific POI

After completing module 13, students will be able to:

  • Receive location update notifications
  • Select a location provider
  • Process location updates efficiently
  • Receive location update notifications
  • Select a location provider
  • Process location updates efficiently
  • Locate addresses from coordinates
  • Find locations by name
  • Use geo-fencing to limit your searches to a known area

Module 14: Performance Tuning (XAM370)

During this module you will learn how memory leaks happen in managed memory even with a sophisticated garbage collector and how to discover and fix them. You will then learn several memory issues that are specific to Xamarin.iOS and Xamarin.Android.

Lessons for module 14

  • Identify and fix memory leaks in your code
  • Recognize and fix Xamarin.iOS specific memory problems
  • Recognize and fix Xamarin.Android specific memory problems

Lab : Track down and correct memory leaks in your Xamarin.Forms app

  • Using the Xamarin Profiler to monitor allocations
  • Finding and fixing delegate reference leaks
  • Identifying and breaking strong reference cycles
  • Watch out for peer promotions
  • Show ListView memory and performance with a custom adapter

After completing module 14, students will be able to:

  • Find memory leaks in your code
  • Fix common leaks in managed code

Module 15: Preparing for Publishing (XAM220)

Prepare your app for release through the App Store, Google Play, an Windows Marketplace.

Lessons for module 15

  • Getting ready to publish your app
  • Understanding publishing styles
  • Publishing to a store

Lab : Implementing and managing Azure AD synchronization

  • Update your app for publishing
  • Choose a distribution strategy
  • Publish to a store

After completing module 15, students will be able to:

  • Update your app for publishing
  • Choose a distribution strategy
  • Publish to a store

Module 16: Android Publishing (AND220)

Build an app package and submit it to the Google Play Store and Amazon App Store.

Lessons for module 16

  • Configure your app for publishing
  • Create a Google Play developer account
  • Create an app package
  • Submit your application for publishing

Lab : Implementing and managing Azure AD synchronization

  • Configuring directory synchronization
  • Synchronization directories

After completing module 16, students will be able to:

  • Optimize the release build settings
  • Verify the app details
  • Set a version number
  • Create an APK using Visual Studio
  • Sign an application using a keystore
  • Side-load an application
  • Submit an application to the Google Play Store
  • Submit an application to the Amazon app store

Privacy Notice

In order to provide you with the service requested we will need to retain and use your contact information in accordance with our Privacy Notice. If you choose to provide us with this information you explicitly consent to us using the information as necessary to provide the requested service to you. If you do not agree please do not proceed to request the service from us.

Marketing Permissions

Would you like to receive our newsletter and other information on products and services which we think will be of interest to you by email. We will always treat your information with care and in accordance with our Privacy Notice. You are free to withdraw this permission at any time.

 

Online Courses

You may prefer an online course if you are looking for a flexible and cost-effective solution. Online courses allow you to study at your own pace, at a time that suits you.

We have the following eLearning options available:

Virtual Classroom

Virtual classrooms provide all the benefits of attending a classroom course without the need to arrange travel and accomodation. Please note that virtual courses are attended in real-time, commencing on a specified date.

Virtual Course Dates

Our Customers Include