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

Add Shared Preferences in to the app #2

Open
justdvnsh opened this issue Oct 14, 2021 · 5 comments
Open

Add Shared Preferences in to the app #2

justdvnsh opened this issue Oct 14, 2021 · 5 comments
Labels
enhancement New feature or request feature Add when a new feature is to be added good first issue Good for newcomers hacktoberfest The issues can be counted in hacktoberfest help wanted Extra attention is needed P1 priority 1 task

Comments

@justdvnsh
Copy link
Owner

We need to add shared preferences into the app, so that we can retain the instances like the UI theme of the app, or if the user is opening the app for the first time or not.

NOTE: - The shared preferences should be made like a container which can be injected anywhere we want.

The shared preference class should be made in a module which can be injected by dagger anywhere in the app. I have added a reference . Also, the file should be in the DI package of the app module

@Module
@InstallIn(ActivityComponent::class.java)
class SharedPreference {
    // rest of the shared prefs implementation goes here.
}
@justdvnsh justdvnsh added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers feature Add when a new feature is to be added hacktoberfest The issues can be counted in hacktoberfest P1 priority 1 task labels Oct 14, 2021
@hardiksachan
Copy link

Hey! I'm interested in this. Just one question first, do you specifically mean SharedPreferences, or Jetpack Datastore can be used?

@justdvnsh
Copy link
Owner Author

Hi @hardiksachan Thank you so much for your interest. I have assigned it to you. Happy coding. You can use datastores if you like. Just keep follow the coding structure as used in the app.
Thanks. Also please the star the repo if possible. It really helps a lot. thanks

@hardiksachan
Copy link

Unfortunately, I will not be able to finish this. Sorry to cause any delays

@hardiksachan hardiksachan removed their assignment Oct 24, 2021
@justdvnsh
Copy link
Owner Author

@hardiksachan No worries. You can look for any other issues if you want. Thanks for your help.

@Devendra34
Copy link

Hi, can I continue with the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature Add when a new feature is to be added good first issue Good for newcomers hacktoberfest The issues can be counted in hacktoberfest help wanted Extra attention is needed P1 priority 1 task
Projects
None yet
Development

No branches or pull requests

3 participants