Xamarin Blueprints

Leverage the power of Xamarin to create stunning cross-platform and native apps

Xamarin Blueprints

Michael Williams

1 customer reviews
Leverage the power of Xamarin to create stunning cross-platform and native apps
Mapt Subscription
FREE
€29.98/m after trial
eBook
€32.76
RRP €46.78
Save 29%
Print + eBook
€47.99
RRP €47.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
€0.00
€32.76
€47.99
€29.98p/m after trial
RRP €46.78
RRP €47.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785887444
Paperback516 pages

Book Description

Do you want to create powerful, efficient, and independent apps from scratch that will leverage the Xamarin framework and code with C#? Well, look no further; you've come to the right place!

This is a learn-as-you-build practical guide to building eight full-fledged applications using Xamarin.Forms, Xamarin Android, and Xamarin iOS.

Each chapter includes a project, takes you through the process of building applications (such as a gallery Application, a text-to-speech service app, a GPS locator app, and a stock market app), and will show you how to deploy the application's source code to a Google Cloud Source Repository. Other practical projects include a chat and a media-editing app, as well as other examples fit to adorn any developer's utility belt.

In the course of building applications, this book will teach you how to design and prototype professional-grade applications implementing performance and security considerations.

Table of Contents

Chapter 1: Building a Gallery Application
Create an iOS project
Creating a UIViewController and UITableView
Customizing a cell's appearance
Creating an Android project
Creating an XML interface and ListView
Shared projects
Custom row appearance
Bitmap functions
The ALAssetLibrary
Adding the iOS photo screen
Adding the Android photo screen
Summary
Chapter 2: Building a SpeechTalk Application
Cross-platform development with Xamarin.Forms
Setting up platform projects
Setting up the SpeechTalk.iOS project
Setting up the SpeechTalk.Droid project
Xamarin.Forms, Windows Phone, and Visual Studio
Inversion of Control (IoC) with Xamarin.Forms
Autofac
iOS text-to-speech implementation
Bindings
Android text-to-speech implementation
Setting up IoC with Android
WinPhone text-to-speech implementation
IoC with Windows Phone
Platform independent styling
Summary
Chapter 3: Building a GPS Locator Application
Core location and GPS
Handling location updates
Summary
Chapter 4: Building an Audio Player Application
Solution setup
Inversion of control with MVVMCross
View-models with Xamarin native
Creating the bindings
NSLayoutContraints
MVVMCross setup inside the PCL
Setting up MVVMCross with iOS
Setting up MVVMCross with Android
The SoundHandler interface
Implementing the iOS SoundHandler using the AVAudioPlayer framework
The Mvx IoC container
The audio player
A cleaner code approach to NSLayout
Creating AudioPlayerPageViewModel
Implementing the Android SoundHandler using the MediaPlayer framework
XML and Mvx bindings
MvxActivities
Summary
Chapter 5: Building a Stocklist Application
Understanding the backend
Creating an ASP.Net Web API 2 project
Building an API controller
Setting up the mobile projects
Building core mobile projects
Improving app performance
Creating a global App.xaml
Theming with ControlTemplates
Updating the MainPageViewModel
Creating the Stocklist web service controller
ListViews and ObservableCollections
Value converters
Adding a DataTemplate to the global resource dictionary
Styles
Further optimization with XAML
Creating StockItemDetailsPage
Custom renderers
Adding styles for custom elements
Creating StockItemDetailsPageViewModel
Setting up the native platform projects
Hosting the Web API project locally
Summary
Chapter 6: Building a Chat Application
The Model-View-Presenter (MVP) pattern
Architecture
SignalR
Starting with Open Web Interface for .NET (OWIN)
Setting up the AuthenticationRepository
Setting up mobile projects
Setting up the navigation service
Handling Hub proxy callbacks
Implementing the LoginPresenter
Creating the connection between Presenter and View
Building the LoginActivity
Implementing the ClientsListPresenter
Creating ClientListViewController
The TaskCompletionSource framework
Creating the ClientsListActivity
Overriding the OnBackPressed activity
Building the ListAdapter
Building the ChatPresenter
Building the iOS ChatView
Extending the UIColor framework
Android TableLayouts
Building the Android ChatActivity
Running the server and clients
Summary
Chapter 7: Building a File Storage Application
Project structure setup
Building a data access layer using SQLite
Building the ISQLiteStorage interface
Adding additional threading techniques
Creating the AsyncSemaphore
Creating the AsyncLock
Implementing native setup requirements for SQLite
Implementing the IoC container and modules
Implementing cross-platform logging
Implementing the SQLiteStorage class
Introduction to C# 6.0 syntax
Handling alerts in view-models
Building the IMethods interface
Building the ExtendedContentPage
Building a CarouselView using custom layouts
Adding scroll control to the CarouselView
Building a CustomRenderer for native gestures
Building the user interface
Using a SynchronizationContext
Building the EditFilePage
Behaviours
Challenge
Building the Windows Phone version
Summary
Chapter 8: Building a Camera Application
Solution setup
Building the MainPageViewModel class
Improving the INotifiedPropertyChanged implementation
Creating the custom UI objects
Building the FocusView
Xamarin.Forms animations
Xamarin.Forms compound animations
Building the CameraView
Building a control for the iOS camera
Building the iOS CameraRenderer
Integrating the Android Camera2 framework
Building the CameraViewRenderer in Android
Handling native touch events through the FocusView
Using RX to handle events
Building a VisualElementRenderer for iOS
Building the CustomImageRenderers
Building the UIImageEffects class
Building the CustomImageRenderer for Android
Triggers
Platform effects
Building the CameraPage
Adding native orientation events
Challenge
Summary

What You Will Learn

  • Discover eight different ways to create your own Xamarin applications
  • Improve app performance by using SQLite for data-intensive applications
  • Set up a simple web service to feed JSON data into mobile applications
  • Store files locally with Xamarin.Forms using dependency services
  • Use Xamarin extension libraries to create effective applications with less coding

Authors

Table of Contents

Chapter 1: Building a Gallery Application
Create an iOS project
Creating a UIViewController and UITableView
Customizing a cell's appearance
Creating an Android project
Creating an XML interface and ListView
Shared projects
Custom row appearance
Bitmap functions
The ALAssetLibrary
Adding the iOS photo screen
Adding the Android photo screen
Summary
Chapter 2: Building a SpeechTalk Application
Cross-platform development with Xamarin.Forms
Setting up platform projects
Setting up the SpeechTalk.iOS project
Setting up the SpeechTalk.Droid project
Xamarin.Forms, Windows Phone, and Visual Studio
Inversion of Control (IoC) with Xamarin.Forms
Autofac
iOS text-to-speech implementation
Bindings
Android text-to-speech implementation
Setting up IoC with Android
WinPhone text-to-speech implementation
IoC with Windows Phone
Platform independent styling
Summary
Chapter 3: Building a GPS Locator Application
Core location and GPS
Handling location updates
Summary
Chapter 4: Building an Audio Player Application
Solution setup
Inversion of control with MVVMCross
View-models with Xamarin native
Creating the bindings
NSLayoutContraints
MVVMCross setup inside the PCL
Setting up MVVMCross with iOS
Setting up MVVMCross with Android
The SoundHandler interface
Implementing the iOS SoundHandler using the AVAudioPlayer framework
The Mvx IoC container
The audio player
A cleaner code approach to NSLayout
Creating AudioPlayerPageViewModel
Implementing the Android SoundHandler using the MediaPlayer framework
XML and Mvx bindings
MvxActivities
Summary
Chapter 5: Building a Stocklist Application
Understanding the backend
Creating an ASP.Net Web API 2 project
Building an API controller
Setting up the mobile projects
Building core mobile projects
Improving app performance
Creating a global App.xaml
Theming with ControlTemplates
Updating the MainPageViewModel
Creating the Stocklist web service controller
ListViews and ObservableCollections
Value converters
Adding a DataTemplate to the global resource dictionary
Styles
Further optimization with XAML
Creating StockItemDetailsPage
Custom renderers
Adding styles for custom elements
Creating StockItemDetailsPageViewModel
Setting up the native platform projects
Hosting the Web API project locally
Summary
Chapter 6: Building a Chat Application
The Model-View-Presenter (MVP) pattern
Architecture
SignalR
Starting with Open Web Interface for .NET (OWIN)
Setting up the AuthenticationRepository
Setting up mobile projects
Setting up the navigation service
Handling Hub proxy callbacks
Implementing the LoginPresenter
Creating the connection between Presenter and View
Building the LoginActivity
Implementing the ClientsListPresenter
Creating ClientListViewController
The TaskCompletionSource framework
Creating the ClientsListActivity
Overriding the OnBackPressed activity
Building the ListAdapter
Building the ChatPresenter
Building the iOS ChatView
Extending the UIColor framework
Android TableLayouts
Building the Android ChatActivity
Running the server and clients
Summary
Chapter 7: Building a File Storage Application
Project structure setup
Building a data access layer using SQLite
Building the ISQLiteStorage interface
Adding additional threading techniques
Creating the AsyncSemaphore
Creating the AsyncLock
Implementing native setup requirements for SQLite
Implementing the IoC container and modules
Implementing cross-platform logging
Implementing the SQLiteStorage class
Introduction to C# 6.0 syntax
Handling alerts in view-models
Building the IMethods interface
Building the ExtendedContentPage
Building a CarouselView using custom layouts
Adding scroll control to the CarouselView
Building a CustomRenderer for native gestures
Building the user interface
Using a SynchronizationContext
Building the EditFilePage
Behaviours
Challenge
Building the Windows Phone version
Summary
Chapter 8: Building a Camera Application
Solution setup
Building the MainPageViewModel class
Improving the INotifiedPropertyChanged implementation
Creating the custom UI objects
Building the FocusView
Xamarin.Forms animations
Xamarin.Forms compound animations
Building the CameraView
Building a control for the iOS camera
Building the iOS CameraRenderer
Integrating the Android Camera2 framework
Building the CameraViewRenderer in Android
Handling native touch events through the FocusView
Using RX to handle events
Building a VisualElementRenderer for iOS
Building the CustomImageRenderers
Building the UIImageEffects class
Building the CustomImageRenderer for Android
Triggers
Platform effects
Building the CameraPage
Adding native orientation events
Challenge
Summary

Book Details

ISBN 139781785887444
Paperback516 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

C# 6 and .NET Core 1.0: Modern Cross-Platform Development Book Cover
C# 6 and .NET Core 1.0: Modern Cross-Platform Development
€ 43.18
€ 30.24
Mastering Cross-Platform Development with Xamarin Book Cover
Mastering Cross-Platform Development with Xamarin
€ 39.58
€ 27.72
Mastering Xamarin.Forms Book Cover
Mastering Xamarin.Forms
€ 26.38
€ 18.48
ASP.NET Core and Angular 2 Book Cover
ASP.NET Core and Angular 2
€ 38.38
€ 26.88
Mastering C# and .NET Framework Book Cover
Mastering C# and .NET Framework
€ 38.38
€ 26.88
Learning Angular 2 Book Cover
Learning Angular 2
€ 34.78
€ 24.36