From 7f986769574b75239a5ac3ae54fd67202d61d89c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 16 Dec 2011 20:57:21 +0300 Subject: implement cloud settings backup --- src/org/fox/ttrss/PrefsBackupAgent.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/org/fox/ttrss/PrefsBackupAgent.java (limited to 'src/org') diff --git a/src/org/fox/ttrss/PrefsBackupAgent.java b/src/org/fox/ttrss/PrefsBackupAgent.java new file mode 100644 index 00000000..0a7e5dec --- /dev/null +++ b/src/org/fox/ttrss/PrefsBackupAgent.java @@ -0,0 +1,19 @@ +package org.fox.ttrss; + +import android.app.backup.BackupAgentHelper; +import android.app.backup.SharedPreferencesBackupHelper; + +public class PrefsBackupAgent extends BackupAgentHelper { + // The name of the SharedPreferences file + static final String PREFS = "org.fox.ttrss_preferences"; + + // A key to uniquely identify the set of backup data + static final String PREFS_BACKUP_KEY = "prefs"; + + // Allocate a helper and add it to the backup agent + @Override + public void onCreate() { + SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, PREFS); + addHelper(PREFS_BACKUP_KEY, helper); + } +} -- cgit v1.2.3