1
0
mirror of https://github.com/nerzhul/ownCloud-SMS-App.git synced 2025-06-11 18:06:26 +00:00
2014-12-12 15:52:07 +01:00

28 lines
770 B
Java

package fr.unix_experience.owncloud_sms.prefs;
import fr.unix_experience.owncloud_sms.R;
import android.content.Context;
import android.content.SharedPreferences;
public class OCSMSSharedPrefs {
public OCSMSSharedPrefs(Context context) {
_context = context;
_sPrefs = _context.getSharedPreferences(_context.getString(R.string.shared_preference_file), Context.MODE_PRIVATE);
}
public void setLastMessageDate(Long msgDate) {
SharedPreferences.Editor editor = _sPrefs.edit();
editor.putLong(_context.getString(R.string.pref_lastmsgdate), msgDate);
editor.commit();
}
public Long getLastMessageDate() {
return _sPrefs.getLong(_context.getString(R.string.pref_lastmsgdate), 0);
}
private SharedPreferences _sPrefs;
private Context _context;
}