Book Image

Mastering Cross-Platform Development with Xamarin

Book Image

Mastering Cross-Platform Development with Xamarin

Overview of this book

The main goal of this book is to equip you with the required know-how to successfully analyze, develop, and manage Xamarin cross-platform projects using the most efficient, robust, and scalable implementation patterns. This book starts with general topics such as memory management, asynchronous programming, local storage, and networking, and later moves onto platform-specific features. During this transition, you will learn about key tools to leverage the patterns described, as well as advanced implementation strategies and features. The book also presents User Interface design and implementation concepts on Android and iOS platforms from a Xamarin and cross-platform perspective, with the goal to create a consistent but native UI experience. Finally, we show you the toolset for application lifecycle management to help you prepare the development pipeline to manage and see cross-platform projects through to public or private release.
Table of Contents (19 chapters)
Mastering Cross-Platform Development with Xamarin
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Background tasks


Threading and task solutions are not the only option when there is a need to execute a not time-bound, long running process. Moreover, both of these options are for executing code when your application is in the foreground or in an active state. When the application is entering the backgrounded or suspended state, the application might still require the execution of some longer method before the volatile data is lost, or it might require a process to be running in the background when the application is not in an interactive state.

For these types of scenarios, both iOS and Android offer backgrounding and background operation options.

Background tasks on iOS

Background tasks on iOS are the easiest way for your application to execute processing tasks without the need for the UI thread or having to respond to lifecycle delegates.

There are three types of background tasks that can be executed for different needs:

  • Background-safe tasks: These tasks are the ones that can be executed...