Get SharedPreference values from activity to a fragment
Shared Pref code in activty
val editor =PreferenceManager.getDefaultSharedPreferences(applicationContext).edit()
                        editor.putString("Token", addToken)
                        editor.putString("isNew", 
  response.body()!!.isNew)
                        editor.putString("ccid", 
  response.body()!!.ccId)
                        editor.putString("email", email)
 editor.apply()
SharedPref Code in Fragment
   val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
    token = sharedPreferences.getString("Token", "")
    ccID = sharedPreferences.getString("ccid", "")
How to retrieve the values of shared Preference in a fragment from an Activity.Currently i'm not able to access the token from activity to fragment
 
     
     
    