Book description
Leverage the power of Xamarin to create stunning cross-platform and native apps
About This Book
- Helps you get a clear practical understanding of creating professional-grade apps with Xamarin
- Covers Xamarin.Forms, Xamarin Android, and Xamarin iOS
- If you want to transform yourself from an amateur mobile developer into a professional app developer across multiple platforms, then this is the ideal book for you
Who This Book Is For
If you are a mobile developer looking to create interesting and fully featured apps for different platforms, then this book is the ideal solution for you. A basic knowledge of Xamarin and C# programming is assumed
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
In Detail
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.
Style and approach
A project-based approach that will solve all your needs when it comes to creating native Android, iOS, and cross-platform apps efficiently and effectively.
Publisher resources
Table of contents
-
Xamarin Blueprints
- Xamarin Blueprints
- Credits
- About the Author
- About the Reviewer
- www.PacktPub.com
- Preface
-
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
-
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
-
3. Building a GPS Locator Application
- Core location and GPS
-
Handling location updates
- Android and the LocationManager
- Creating an exit point
- Creating an API key for Android
- Creating our Windows project
- Core Location Services with Windows Phone
- The Application class
- Web services and data contracts
- What about data contracts?
- Creating another API key for geocoding
- Creating GeocodingWebServiceController
- Newtonsoft.Json and Microsoft HTTP client libraries
- ModernHttpClient and client message handlers
- Feeding JSON data into the IObservable framework
- More Reactive Extensions
- Resource (RESX) files
- Using GeocodingWebServiceController
- OnNavigatedTo and OnShow
- Pythagoras equirectangular projection
- How are we going to calculate the closest position?
- Summary
-
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
-
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
-
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
-
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
-
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
Product information
- Title: Xamarin Blueprints
- Author(s):
- Release date: September 2016
- Publisher(s): Packt Publishing
- ISBN: 9781785887444
You might also like
book
Xamarin 4 By Example
Design, develop, and publish your own mobile apps for iOS and Android using C# and Xamarin …
book
Make: Easy 1+2+3 Projects
From the pages of Make: magazine comes this collection of dozens of projects you can make …
book
Programming iOS 9
Start building apps for iOS 9 with Apple’s Swift programming language. If you’re grounded in the …
book
Mastering Xamarin UI Development - Second Edition
Learn how to build stunning, maintainable, cross-platform mobile application user interfaces using C# 7 with the …