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

PreferenceManager deprecated, what to do now? #48

Open
DineshNeupane opened this issue Nov 7, 2019 · 2 comments
Open

PreferenceManager deprecated, what to do now? #48

DineshNeupane opened this issue Nov 7, 2019 · 2 comments

Comments

@DineshNeupane
Copy link

This class was deprecated in API level 29.
Use the AndroidX Preference Library for consistent behavior across all devices. For more information on using the AndroidX Preference Library see Settings.
https://developer.android.com/reference/android/preference/PreferenceManager

Any solutions to this?

@kcochibili
Copy link
Owner

Even though its deprecated, I believe it still works. So ignore the warning and keep coding.

@nikunjparadva
Copy link

Use with AndroidX is as below

  • add this to app level build.gradle
    implementation 'androidx.preference:preference:1.1.1'
  • remove this line from TinyDB.java
    import android.preference.PreferenceManager;
  • add this line in TinyDB.java
    import androidx.preference.PreferenceManager;

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

3 participants