Android SQLite Database Tutorial and Examples.
What is SQLite and How to use it to store data within android devices.
SQLite is a tiny in process SQL database engine commonly embedded in devices and applications. This is because of it’s serverless, zero-configuration and self-containment nature. Not only that but also the fact that it’s free and available under public domain. Read more about SQLite here.
Why This Tutorial?
Well we want to see dozens of real world SQLite examples in android. As I said, SQLite is the defacto database engine for android. Most of alternatives to SQLite are not mature enough or run as servers thus requiring alot of configurations and resources. Not only is SQlite the standard db engine for android but also the iOS, the next most popular mobile operating system after android.
So we will write several examples to see how to work with SQLite in different contexts and with several widgets.
SQLite Examples with Different Widgets
1. SQLite CRUD with Spinner.
Spinner is an android widget allowing us display items in a dropdown fashion. It is similar to combobox in other languages. It can be a popular component for rendering data. For instance you can imagine if you a list of category of products that you want users to select. You can fetch them from database and render them in Spinner.