Android DataStore with Jetpack Compose
Learn to use DataStore by building an MVVM app with Jetpack Compose that displays a list of comics and persists filters and sort order of the comics. DataStore is a safe and durable way to store small amounts of data, such as key-value pairs, preferences and application states.
What app will you build in this course?
ComicsWorld is an application that displays a categorized list of comics that can also be filtered on the basis of their category and can be sorted alphabetically and by their popularity. This app uses the recommended MVVM architecture and helps you to understand how to integrate Jetpack DataStore in your project.
In this course: Android Jetpack DataStore, you will learn the fundamentals required to implement DataStore with MVVM architecture to persist your key-value pairs and typed objects with protocol buffers in your jetpack compose apps. First, you will learn the difference between SharedPreferences and DataStore, and why DataStore is preferred over SharedPreferences. Secondly, you will learn the two implementations of DataStore namely: Proto and Preference Data Store. Thirdly, you will learn how to create a preference DataStore, to read and write from it. Then you will learn to create a Proto DataStore and how to read and write from it. Then you will learn to create a Repository layer that interacts with both Data Store, and integrate the Repository layer with the UI layer i.e the ViewModels and your Composables. Additionally, you will learn how to test and debug your DataStore. Finally, you will learn the pros and cons of each type of DataStore implementation and their use cases.
- Tabulate the differences between SharedPreferences, Preference DataStore and Proto DataStore
- Understanding Preference Data Store and Proto DataStore
- Reading and Writing From Preference Data Store
- Writing and Reading From Proto Data Store
- Testing Preference Data Store and Proto DataStore
- Integrating both Preference and Proto DataStore in MVVM Architecture with Jetpack Compose
- Exploring the pros and cons of Proto DataStore and Preference DataStore
Meet the instructor
Gibson is an android engineer with 4+ years of experience in creating high quality android applications using both Kotlin and Java languages. On top of being a speaker and an educator, he is passionate about mobile development and learning.