DataStore     Android Developers
DRANK

Store data asynchronously, consistently, and transactionally, overcoming some of the drawbacks of SharedPreferencesLatest UpdateCurrent Stable ReleaseNext Release CandidateBeta ReleaseAlpha ReleaseNovember 17, 2020---1.0.0-alpha04Declaring dependenciesTo add a dependency on DataStore, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.There are two implementations of DataStore: Preferences and Proto. Choose one or the other. You can also add Android-free dependencies to either implementation.Add the dependencies for the implementation you need in the build.gradle file for your app or module:Typed// Typed DataStore (Typed API surface, such as Proto) dependencies { implementation "androidx.datastore:datastore:1.0.0-alpha04" } // Alternativey - use the following artifact without an Android dependency. dependencies { implementation "androidx.datastore:datastore-core:1.0.0-alpha04" } Preferences// Preferences DataStore (SharedP…

developer.android.com
Related Topics: Android
1 comments