How to use Proto DataStore in Android

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…

--

--

--

Shares Android development and Kotlin programming.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Understanding Kotlin — Part 3

“Ionic 3 — Bug’s fast fixed

How to create Toast message in Jetpack Compose | Android?

Great article and very articulately presented.

Building an Android Video Chat App with In-Call Statistics

Accelerate Android Development using Jetpack Components

Understanding ImageDecoder API in Android

Complete Android Data Binding Step by Step

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Hank Li

Hank Li

Shares Android development and Kotlin programming.

More from Medium

Retained Dagger Component over Configuration Changes

The magic of RxJava with a bit of Kotlin awesome collections tools

Optimizing WebView load time in Helpshift’s SDK X

KOTLIN- THE TRENDING LANGUAGE IN THE ANDROID WORLD!