Our great sponsors
-
AndroidNews
A simple RSS feed reader app (written in Kotlin and Jetpack Compose) that currently reads my blog (Android Kotlin Weekly)'s feed.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
In this example, it is created in the main activity. Depending on your need, you can also create it in the repository class if it is only referenced there. You can see the example here.
GitHub Repository: Demo_DataStore
This is what I have in my view model. To write to a preferences DataStore, you use the DataStore.edit() suspend API. Since it is a suspend function, you need to launch it under a coroutine.
NOTE:
The number of mentions on this list indicates mentions on common posts plus user suggested alternatives.
Hence, a higher number means a more popular project.
Related posts
- How to add Google Play In-app Review Dialog?
- What's modern approach to handling Preferences (UI & Storage) in Compose?
- It's Hacktoberfest time - Time to gear up your skill
- Requesting best practices to remove lag on Jetpack compose Sectioned LazyColumn
- Performance Impact Analysis of Gradle 8.7 in Android Projects