Shared Preferences are created as follows:
edt = sp.edit();
edt.putString("token_value", pojo.getKey());
edt.commit();
and I want to use this values in another class like this:
String key = sp.getString("token_value", "");
at this point I got an error like this:
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String android.content.SharedPreferences.getString(java.lang.String, java.lang.String)' on a null object reference
Please give me your valuable suggestions and thanks in advance...