Book Image

Android Programming for Beginners

By : John Horton, Paresh Mayani
Book Image

Android Programming for Beginners

By: John Horton, Paresh Mayani

Overview of this book

Android is the most popular OS in the world. There are millions of devices accessing tens of thousands of applications. It is many people's entry point into the world of technology; it is an operating system for everyone. Despite this, the entry-fee to actually make Android applications is usually a computer science degree, or five years’ worth of Java experience. Android Programming for Beginners will be your companion to create Android applications from scratch—whether you’re looking to start your programming career, make an application for work, be reintroduced to mobile development, or are just looking to program for fun. We will introduce you to all the fundamental concepts of programming in an Android context, from the Java basics to working with the Android API. All examples are created from within Android Studio, the official Android development environment that helps supercharge your application development process. After this crash-course, we’ll dive deeper into Android programming and you’ll learn how to create applications with a professional-standard UI through fragments, make location-aware apps with Google Maps integration, and store your user’s data with SQLite. In addition, you’ll see how to make your apps multilingual, capture images from a device’s camera, and work with graphics, sound, and animations too. By the end of this book, you’ll be ready to start building your own custom applications in Android and Java.
Table of Contents (37 chapters)
Android Programming for Beginners
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 23. Using SQLite Databases in Our Apps

If we are going to make apps that offer our users significant features, then almost certainly we are going to need a way to manage, store, and filter significant amounts of data.

It is possible to efficiently store very large amounts of data with JSON, but when we need to use this data selectively, instead of simply restricting ourselves to the options of "save everything" and "load everything", we need to think about which other options are available.

A good computer science course would probably teach the algorithms necessary to handle sorting and filtering our data, but the efforts involved to do this would be quite extensive. Also, what are the chances of us coming up with a solution that is as good as one offered by the people who provide us with the Android API?

As always, it makes sense for us to use the solutions provided in the Android API. As we have seen, JSON and SharedPreferences classes have their place, but at some point, we need...