replace activity with getApplicationContext for shared preference