Book Image

Android SQLite Essentials

By : Sunny Kumar Aditya, Vikash Kumar Karn
Book Image

Android SQLite Essentials

By: Sunny Kumar Aditya, Vikash Kumar Karn

Overview of this book

<p>SQLite is an open source relational database management system. Android uses the SQLite database to store and retrieve data persistently. The driving force behind the platform is the database, enabling a myriad of choices for developers making cutting-edge applications.</p> <p>Android SQLite Essentials focuses on the core concepts behind building database-driven applications. This book covers the basic and advanced topics with equivalent simplicity and detail, in order to enable readers to quickly grasp and implement the concepts to build an application database.</p> <p>This book takes a hands-on, example-based approach to help readers understand the core topics of SQLite and Android database-driven applications. This book focuses on providing you with latent as well as widespread knowledge about practices and approaches towards development in an easily understandable manner.</p>
Table of Contents (11 chapters)

Chapter 4. Thread Carefully

 

"Premature optimization is the root of all evil."

 
 ---Donald Knuth

We covered a very important concept in the previous chapter: content provider. We progressed in a step-by-step manner, covering essential questions such as how to create a content provider and how to use an existing system with a content provider in detail. We also covered how to use the content provider we created by means of creating a test application to access it.

In this chapter, we will explore how to use loaders, in particular, a loader called cursor loader. We will look at how to interact with a content provider asynchronously with the help of an example. We will discuss the important topic of security in the Android database and how we can ensure that data is secured in an Android model. Last but not least, we will also see some code snippets that will cover topics such as how to upgrade a database and how to ship a preloaded database with our application.

In this chapter, we will cover...