Store and access data using keys with DataStore

Learn how to store simple, key-value pair data with Preferences DataStore in an Android app.


Introduction to Datastore

Video Optional

Understand how DataStore works, what implementation it provides, the individual use cases, and more with Android Developer Relations Engineer Simona Stojanovic.

Preferences Datastore

Video Optional

In this video, we’ll take a look at Preferences DataStore, one of two DataStore implementations. Simona goes over how to create it, read and write data, and how to handle exceptions.

Save preferences locally with DataStore


Learn how to store user preferences on the device with DataStore.

What's next?

Video Optional

Congratulations! You finished the sixth unit. You learned so much in this unit, including SQLite databases, the Room library and DataStore. These skills let you build apps that can persist data locally on the user device.


Test your knowledge and earn your DataStore badge.