this code for save
if (!videoKind.equals("trialer")) {
Setting.refresh=true;
lastSeen();
SharedPreferences sharedPreferences = this.getSharedPreferences(this.getString(R.string.app_name),0);
SharedPreferences.Editor editor=sharedPreferences.edit();
editor.putLong(videoUrl,10);
editor.commit();
}
and this for get
SharedPreferences sharedPreferences = context.getSharedPreferences(context.getString(R.string.app_name),0);
for (SourceModel m:model.getSourceModels()) {
if (sharedPreferences.getLong(m.getUrl(),-1)!=-1){
holder.seen.setVisibility(View.VISIBLE);
}
}
but it work only you in the activity and when you leave activity this value will clear
Recognized by Mobile Development Collective