Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Jetpack Proto Data Store from Shared Preferences when you have more than 300 Preferences in your android app? #26

Open
gb103 opened this issue Mar 30, 2021 · 0 comments

Comments

@gb103
Copy link

gb103 commented Mar 30, 2021

Shared Preferences are used heavily into my application, they are more than 300s of every possible data types such as int, boolean, String etc etc.

Now I want to migrate into Jetpack Proto Data store, the all the tutorials which I have tried define all the preferences into .proto file and then retrieve the data from Data Store and provides a FLOW object of the class in which all possible preferences are defined.

The class structure which I define into proto, is used to create Serializer as well into Flow object of the retrieved value, so my QUESTION is,

Do I need to define all the 300+ preferences into a single file first and then use them (It would require me to lots of code to write into each places wherever shared prefs is used) OR is there any better way of migration ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant