android preference deprecated code example
Example 1: preferencemanager is deprecated
//You can use AndroidX support library version of PreferenceManager
androidx.preference.PreferenceManager
//not
android.preference.PreferenceManager
//remember to add the following to your build.gradle if needed
implementation 'androidx.preference:preference:1.1.1'
Example 2: anroid preference manager deprecated substiotuion
implementation "androidx.preference:preference-ktx:1.1.0"