Java Code Examples for android.app.backup.FileBackupHelper

The following examples show how to use android.app.backup.FileBackupHelper. These examples are extracted from open source projects. 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 Project: ShadowsocksRR   Source File: ShadowsocksBackupAgent.java    License: 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 Project: Maying   Source File: ShadowsocksBackupAgent.java    License: 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 Project: mobikul-standalone-pos   Source File: MyBackupAgent.java    License: 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 Project: andOTP   Source File: BackupAgent.java    License: 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 Project: octoandroid   Source File: OctoBackupAgent.java    License: 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 Project: KinoCast   Source File: BackupAgent.java    License: 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 Project: ministocks   Source File: BackupAgent.java    License: MIT License 4 votes vote down vote up
public void onCreate() {
    FileBackupHelper helper = new FileBackupHelper(this, PortfolioStockRepository.PORTFOLIO_JSON);
    addHelper(FILES_BACKUP_KEY, helper);
}