5

Android Developers Blog: Jetpack DataStore - wrap up

 2 years ago
source link: https://android-developers.googleblog.com/2022/03/jetpack-datastore-wrap-up.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

AVvXsEhuRFbfaiimJrtg7wBiLqhyitaRMaCW2krQAAWvTGKVCvlCKxDD9OKFwmY8cUq66oGJt8b_E0X_OIcpHc5CrhkldrbxGhsYMYqhRzLdgaN-lXjxkpYanlLBVjAQ981zVj7u10fPe5aRHSOgFoHO_-cgo_xVthiuS4MfwYLJr1oPbrKr9Q2ltY_gl7Dx

Posted by Simona Stojanovic, Android Developer Relations Engineer

Now that our MAD Skills series on Jetpack DataStore is complete, let’s do a quick wrap up of all the things we’ve covered in each episode:

Episode 1 — Introduction to Jetpack DataStore

We started with the basics of Jetpack DataStore — how it works and the changes and improvements it brings compared to SharedPreferences. We also discussed how to decide between its two implementations, Preferences and Proto DataStore, as well as how to choose between DataStore and Room.

Check out the blog postand the video:

Episode 2 — All about Preferences DataStore

Go deeper into Preferences DataStore: how to create it, read, and write data and how to handle exceptions, all of which should, hopefully, provide you with enough information to decide if it’s the right choice for your app.

Here’s the blog postand the video:

Episode 3 — All about Proto DataStore

Learn about Proto DataStore: how to create it, read, and write data and how to handle exceptions, to better understand the scenarios that make Proto a great choice.

If you prefer reading, here’s the blog post, otherwise, here’s the video:

Episode 4 — DataStore-serialization, sync work, and dependency injection

Episode 4 introduces several different concepts related to DataStore to understand how it works under the hood, so that you have everything at your disposal to use it in a production environment. We focus on: Kotlin Data class serialization, synchronous work, and dependency injection with Hilt.

Take a look at our blogs and video:

DataStore and dependency injection

DataStore and Kotlin serialization

DataStore and synchronous work

Episode 5 — DataStore-handling data migration and testing

Finally, in the fifth episode of our Jetpack DataStore series, we cover two additional concepts around DataStore: DataStore-to-DataStore migrations and testing. Hopefully, this will provide you all the information you need to add DataStore to your app successfully.

Check out the blogs and the video:

DataStore and data migration

DataStore and testing


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK