Skip to content

Instantly share code, notes, and snippets.

@RaheemJnr
Last active October 4, 2021 07:19
Show Gist options
  • Save RaheemJnr/a29135159286621ad3f4b336b744668b to your computer and use it in GitHub Desktop.
Save RaheemJnr/a29135159286621ad3f4b336b744668b to your computer and use it in GitHub Desktop.
datastore example
// Preferences DataStore (SharedPreferences like APIs)
dependencies {
implementation "androidx.datastore:datastore-preferences:1.0.0"
// optional - RxJava2 support
implementation "androidx.datastore:datastore-preferences-rxjava2:1.0.0"
// optional - RxJava3 support
implementation "androidx.datastore:datastore-preferences-rxjava3:1.0.0"
}
// Alternatively - use the following artifact without an Android dependency.
dependencies {
implementation "androidx.datastore:datastore-preferences-core:1.0.0"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment