How to use Proto DataStore in Android

Hank Li
2 min readJan 18, 2022

AndroidX provides new tool for local storage, which is DataStore. There are two types of DataStore, one is Preferences DataStore, which you can save data in key-value pair, just like SharedPreferences, other one is Proto DataStore, which you can save data as an object. Let’s see how to use it in Android.

Let’s get started

  1. Add dependency to build.gradle and don’t…

--

--