android.app.backup.FileBackupHelper Java Examples

The following examples show how to use android.app.backup.FileBackupHelper. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ShadowsocksBackupAgent.java    From ShadowsocksRR with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, PREFS_DISPLAY);
    addHelper(MY_PREFS_BACKUP_KEY, helper);
    addHelper(DATABASE, new FileBackupHelper(this, "../databases/" + DBHelper.PROFILE));
}
 
Example #2
Source File: ShadowsocksBackupAgent.java    From Maying with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, PREFS_DISPLAY);
    addHelper(MY_PREFS_BACKUP_KEY, helper);
    addHelper(DATABASE, new FileBackupHelper(this, "../databases/" + DBHelper.PROFILE));
}
 
Example #3
Source File: MyBackupAgent.java    From mobikul-standalone-pos with MIT License 5 votes vote down vote up
@Override
    public void onCreate() {
//        SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, PREFS, USER_PREFS);
//        addHelper(PREFS_BACKUP_KEY, helper);
        FileBackupHelper fileBackupHelper = new FileBackupHelper(this, dBFile);
        addHelper("dbFile", fileBackupHelper);
//        FileBackupHelper fileBackupHelper1 = new FileBackupHelper(this, dBImageFile);
//        addHelper("dbFile", fileBackupHelper1);
        new BackupManager(getApplicationContext()).dataChanged();
    }
 
Example #4
Source File: BackupAgent.java    From andOTP with MIT License 5 votes vote down vote up
@Override
public void onCreate() {
    String prefs = getDefaultSharedPreferencesName();

    SharedPreferencesBackupHelper sharedPreferencesBackupHelper = new SharedPreferencesBackupHelper(this, prefs);
    addHelper(PREFS_BACKUP_KEY, sharedPreferencesBackupHelper);

    FileBackupHelper fileBackupHelper = new FileBackupHelper(this, Constants.FILENAME_DATABASE, Constants.FILENAME_DATABASE_BACKUP);
    addHelper(FILES_BACKUP_KEY, fileBackupHelper);
}
 
Example #5
Source File: OctoBackupAgent.java    From octoandroid with GNU General Public License v3.0 5 votes vote down vote up
@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);
}
 
Example #6
Source File: BackupAgent.java    From KinoCast with MIT License 4 votes vote down vote up
@Override
public void onCreate() {
    FileBackupHelper helper = new FileBackupHelper(this, BOOKMARKS_FILENAME);
    addHelper(FILES_BACKUP_KEY, helper);
}
 
Example #7
Source File: BackupAgent.java    From ministocks with MIT License 4 votes vote down vote up
public void onCreate() {
    FileBackupHelper helper = new FileBackupHelper(this, PortfolioStockRepository.PORTFOLIO_JSON);
    addHelper(FILES_BACKUP_KEY, helper);
}