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. …