-
Learn how to use the data management and presentation tools of the Android SDK. Explore shared preferences, JSON-formatted text files, and SQLite to manage data.
Android developers who need to manage and present data have many tools available to them in the application framework of Android. This course covers a variety of data persistence techniques, including storing data in shared preferencesâkey-value pairsâin JSON-formatted text files, and in relational databases with SQLite. Join David Gassner as he demonstrates these data management techniques. He also explains how to use relevant design patterns to model data with Java classes, and how to present data to the user with the Android SDK's ListView and RecyclerView components.
Overview
Syllabus
-
Introduction
- Welcome
- What you should know
- How to use the exercise files
- Review the starting app
- What's new in this update
- Model data in POJO classes
- Manage data in Java collections
- Display data in a ListView
- Customize the ListView item display
- Create a custom array adapter
- Display image assets
- Display data in a RecyclerView
- Handle user events in a RecyclerView
- Pass intent extras to detail activities
- Pass parcelable objects as intent extras
- Display detail data
- About shared preferences
- Manage shared preferences with Java
- Create a preferences activity
- Listen for changes to a preference
- Work with files in internal storage
- Work with files in external storage
- Create JSON data files
- Import JSON data files
- Bundle static data in a resource file
- SQLite and Android
- Create an SQLite database
- Manage a database with a DataSource
- Insert data into a table
- Access SQLite from the command line
- Retrieve data with SQLite queries
- Filter and sort data
- Manage SQLite transactions
- Add Room library dependencies
- Define Room entity class
- Define an SQLite database with Room
- Insert data with Room
- Retrieve data with Room
- Run Room queries in background threads
- Next steps