@Override public void onCreate() { Log.d("ConnectBot.BackupAgent", "onCreate called"); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferencesBackupHelper prefsHelper = new SharedPreferencesBackupHelper(this, getPackageName() + "_preferences"); addHelper(PreferenceConstants.BACKUP_PREF_KEY, prefsHelper); FileBackupHelper hosts = new FileBackupHelper(this, "../databases/" + HostDatabase.DB_NAME); addHelper(HostDatabase.DB_NAME, hosts); if (prefs.getBoolean(PreferenceConstants.BACKUP_KEYS, PreferenceConstants.BACKUP_KEYS_DEFAULT)) { FileBackupHelper pubkeys = new FileBackupHelper(this, "../databases/" + PubkeyDatabase.DB_NAME); addHelper(PubkeyDatabase.DB_NAME, pubkeys); } }
@Override public void onCreate() { // The name of the SharedPreferences file final String prefs = getPackageName() + "_preferences"; // getPackageName() cannot be used in final SharedPreferencesBackupHelper prefsHelper = new SharedPreferencesBackupHelper(this, prefs) { @Override public void performBackup(ParcelFileDescriptor oldState, BackupDataOutput data, ParcelFileDescriptor newState) { if (new WorkTimeTrackerBackupManager(WorkTimeTrackerBackupAgentHelper.this).isEnabled()) { super.performBackup(oldState, data, newState); } } }; addHelper(PREFS_BACKUP_KEY, prefsHelper); DbBackupHelper dbHelper = new DbBackupHelper(this); addHelper(DB_BACKUP_KEY, dbHelper); }
@Override public void onCreate() { DbBackupHelper dataBaseBackupHelper = new DbBackupHelper( this, Storage.StorageHelper.DATABASE_NAME ); SharedPreferencesBackupHelper mainSharedPreferencesBackupHelper = new SharedPreferencesBackupHelper( this, DEFAULT_PREFERENCE ); addHelper(BACKUP_PREFERENCE, mainSharedPreferencesBackupHelper); addHelper(BACKUP_DATABASE, dataBaseBackupHelper); super.onCreate(); }
@Override public void onCreate() { SharedPreferencesBackupHelper prefBackupHelper = new SharedPreferencesBackupHelper(this, DEFAULT_PREFS_FILENAME); addHelper(DEFAULT_PREFS_KEY, prefBackupHelper); // TODO not sure if need to implement synchronized since GreenDAO is thread safe... FileBackupHelper dbBackupHelper = new FileBackupHelper(this, StorageModule.DB_NAME); addHelper(PRINTER_DB_KEY, dbBackupHelper); }
@Override public void onCreate() { // This is the preference name used by PreferenceManager.getDefaultSharedPreferences String prefs = getPackageName() + "_preferences"; addHelper(BACKUP_KEY, new SharedPreferencesBackupHelper(this, prefs)); }
@Override public void onCreate() { // Compute the default preferences filename. String defaultPrefsFilename = getPackageName() + "_preferences"; addHelper(PREFS_BACKUP_KEY, new SharedPreferencesBackupHelper(this, defaultPrefsFilename)); }
@Override public void onCreate() { Log.d("ConnectBot.BackupAgent", "onCreate called"); SharedPreferencesBackupHelper prefs = new SharedPreferencesBackupHelper(this, getPackageName() + "_preferences"); addHelper(PreferenceConstants.BACKUP_PREF_KEY, prefs); FileBackupHelper hosts = new FileBackupHelper(this, "../databases/" + HostDatabase.DB_NAME); addHelper(HostDatabase.DB_NAME, hosts); FileBackupHelper pubkeys = new FileBackupHelper(this, "../databases/" + PubkeyDatabase.DB_NAME); addHelper(PubkeyDatabase.DB_NAME, pubkeys); }
@Override public void onCreate() { FileBackupHelper helperFileBackupHelper = new FileBackupHelper(this, HIGH_SCORES_FILENAME); addHelper(FILES_BACKUP_KEY, helperFileBackupHelper); SharedPreferencesBackupHelper helperSharedPreferencesBackupHelper = new SharedPreferencesBackupHelper(this, PREFS_DISPLAY, PREFS_SCORES); addHelper(MY_PREFS_BACKUP_KEY, helperSharedPreferencesBackupHelper); }
@Override public void onCreate() { // Hoo boy, there's a few prefs to back up... SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper( this, GHDConstants.PREF_AUTOZOOM, GHDConstants.PREF_COORD_UNITS, GHDConstants.PREF_DEFAULT_GRATICULE_GLOBALHASH, GHDConstants.PREF_DEFAULT_GRATICULE_LATITUDE, GHDConstants.PREF_DEFAULT_GRATICULE_LONGITUDE, GHDConstants.PREF_DIST_UNITS, GHDConstants.PREF_INFOBOX, GHDConstants.PREF_KNOWN_LOCATIONS, GHDConstants.PREF_LAST_MAP_TYPE, GHDConstants.PREF_LAST_SEEN_VERSION, GHDConstants.PREF_NEARBY_POINTS, GHDConstants.PREF_SHOW_KNOWN_LOCATIONS, GHDConstants.PREF_STARTUP_BEHAVIOR, GHDConstants.PREF_STOCK_ALARM, GHDConstants.PREF_STOCK_CACHE_SIZE, GHDConstants.PREF_STOP_BUGGING_ME_PREFETCH_WARNING, GHDConstants.PREF_WIKI_PASS, GHDConstants.PREF_WIKI_USER, GHDConstants.PREF_NIGHT_MODE ); addHelper(PREFS_BACKUP_KEY, helper); }
@SuppressLint("NewApi") @Override public void onCreate() { super.onCreate(); String prefsName = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N ? PreferenceManager.getDefaultSharedPreferencesName( this) : getDefaultSharedPreferencesName(this); SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, prefsName); addHelper(PREFS_BACKUP_KEY, helper); }
@Override public void onCreate() { // getDatabasePath(DB_NAME).getAbsolutePath() FileBackupHelper dbs = new FileBackupHelper(this, DB_NAME); SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, getPackageName() + "_preferences"); addHelper("prefs", helper); addHelper("dbs", dbs); }
public void onCreate() { Context app = getApplicationContext(); if (app instanceof DSCApplication) { mApplication = (DSCApplication) app; } SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, getDefaultSharedPreferencesName()); addHelper(MY_PREFS_BACKUP_KEY, helper); }
@Override public void onCreate() { super.onCreate(); // Back up all the preferences SharedPreferencesBackupHelper prefHelper = new SharedPreferencesBackupHelper(this, PREF_DEF); addHelper(KEY_PREF, prefHelper); }
@Override public void onCreate() { Log.v(TAG, "onCreate called"); SharedPreferencesBackupHelper prefs = new SharedPreferencesBackupHelper(this, getPackageName() + "_preferences"); addHelper(PreferenceConstants.BACKUP_PREF_KEY, prefs); FileBackupHelper streams = new FileBackupHelper(this, "../databases/" + StreamDatabase.DATABASE_NAME); addHelper(StreamDatabase.DATABASE_NAME, streams); FileBackupHelper alarms = new FileBackupHelper(this, "../databases/" + DatabaseHelper.DATABASE_NAME); addHelper(DatabaseHelper.DATABASE_NAME, alarms); }
@Override public void onCreate() { SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, Constants.DEFAULT_PREFERENCES_FILE); addHelper(PREFS_BACKUP_KEY, helper); FileBackupHelper fileBackupHelper = new FileBackupHelper(this, Constants.REALM_FILE_NAME); addHelper(FILES_BACKUP_KEY, fileBackupHelper); }
@Override public void onCreate() { SharedPreferencesBackupHelper sharedPrefsHelper = new SharedPreferencesBackupHelper(this, DEFAULT_SHARED_PREFS_NAME); addHelper(SHARED_PREFS_BACKUP_KEY, sharedPrefsHelper); FileBackupHelper fileHelper = new FileBackupHelper(this, "../databases/" + DbProvider.DB_NAME); addHelper(DbProvider.DB_NAME, fileHelper); super.onCreate(); }
@Override public void onCreate() { addHelper("PREFS_BACKUP_KEY", new SharedPreferencesBackupHelper(this, ApplicationModule.SHARED_PREFERENCES_FILE, getPackageName() + "_preferences")); addHelper("DB_BACKUP_KEY", new DbBackupHelper(this, Database.DB_NAME)); }
@Override public void onCreate() { String packageName = getPackageName(); SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, packageName + "_preferences", G.PROFILES_PREF_NAME); addHelper(PREFS_BACKUP_KEY, helper); G.logD("Backup agent invoked."); }
@Override public void onCreate() { super.onCreate(); // create helper preferences SharedPreferencesBackupHelper appHelper = new SharedPreferencesBackupHelper(this, getPackageName() + "_preferences"); SharedPreferencesBackupHelper dropboxHelper = new SharedPreferencesBackupHelper(this, getPackageName() + "_dropbox_preferences"); // create helper files FileBackupHelper databaseHelper = new FileBackupHelper(this, MmexApplication.getDatabasePath(getApplicationContext())); addHelper(KEY_BACKUP_APP_PREFERENCES, appHelper); addHelper(KEY_BACKUP_DROPBOX_PREFERENCES, dropboxHelper); // todo: addHelper(KEY_BACKUP_RECENT_DB_PREFERENCES, dr); addHelper(KEY_BACKUP_DB, databaseHelper); }
@Override public void onCreate() { SharedPreferencesBackupHelper phelper = new SharedPreferencesBackupHelper(this, SafeSlingerPrefs.PREFS_RECOVER_YES); addHelper(PREFS_BACKUP_KEY, phelper); FileBackupHelper fhelper = new FileBackupHelper(this, getBackupFiles()); addHelper(FILES_BACKUP_KEY, fhelper); }
@Override public void onCreate() { // Prefs SharedPreferencesBackupHelper helperPrefs = new TestSharedPreferencesBackupHelper(this, PREFS, AppConstants.PREFS_FILE_LOGIN); addHelper(BACKUP_KEY_PREFS, helperPrefs); // Database Pairing PairingDbBackupHelper helperDbPairing = new PairingDbBackupHelper(this); addHelper(PairingDbBackupHelper.BACKUP_KEY_PAIRING_DB, helperDbPairing); // Database GeoFence GeoFenceDbBackupHelper helperDbGeofence = new GeoFenceDbBackupHelper(this); addHelper(GeoFenceDbBackupHelper.BACKUP_KEY_GEOFENCE_DB, helperDbGeofence); // Database Person PersonDbBackupHelper helperDbPerson = new PersonDbBackupHelper(this); addHelper(PersonDbBackupHelper.BACKUP_KEY_PERSON_DB, helperDbPerson); }
@Override public void onCreate() { addHelper("prefs", new SharedPreferencesBackupHelper(this, Preferences.PREFS_NAME)); addHelper("log", new DatabaseBackupHelper(this, LogEntry.Columns.getContentUri(this), mLogAdapter)); super.onCreate(); }
@Override public void onCreate() { super.onCreate(); String defaultPrefsFilename = getPackageName() + "_preferences"; SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, defaultPrefsFilename); addHelper(PREFS_BACKUP_KEY, helper); }
@Override public void onCreate() { SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, PREFS); addHelper(PREFS_BACKUP_KEY, helper); FileBackupHelper helperF = new FileBackupHelper(this, DB); addHelper(FILES_BACKUP_KEY, helperF); }
@Override public void onCreate() { addHelper("shared_pref", new SharedPreferencesBackupHelper(this, getPackageName() + "_preferences")); }
@Override public void onCreate() { addHelper("shared_pref", new SharedPreferencesBackupHelper(this, getPackageName() + PREF_SUFFIX)); }
@Override public void onCreate() { String prefsName = getDefaultStoredPreferencesName(getApplicationContext()); SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, prefsName); addHelper(PREFS_BACKUP_KEY, helper); }
@Override public void onCreate() { super.onCreate(); SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, Constants.PREFERENCES_FILE_NAME); addHelper("mypreferences", helper); }
@Override public void onCreate() { SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, PlacesConstants.SHARED_PREFERENCE_FILE); addHelper(PlacesConstants.SP_KEY_FOLLOW_LOCATION_CHANGES, helper); // TODO Add additional helpers for each of the preferences you want to backup. }
public void onCreate() { super.onCreate(); BackupHelper helper = new SharedPreferencesBackupHelper(this, PREFS_PREF); addHelper(PREFS_BACKUP_KEY, helper); }
public void onCreate() { SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, PREFS); addHelper(PREFS_BACKUP_KEY, helper); }
@Override public void onCreate() { SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, PREFS); addHelper(PREFS_BACKUP_KEY, helper); }
@Override public void onCreate() { addHelper(SharedPreferences.class.getSimpleName(), new SharedPreferencesBackupHelper(this, getPackageName() + "_preferences")); }
@Override public void onCreate() { super.onCreate(); String name = EasySharedPreferences.getDefaultName(this); addHelper(name, new SharedPreferencesBackupHelper(this, name)); }