• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java FileBackupHelper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中android.app.backup.FileBackupHelper的典型用法代码示例。如果您正苦于以下问题:Java FileBackupHelper类的具体用法?Java FileBackupHelper怎么用?Java FileBackupHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FileBackupHelper类属于android.app.backup包,在下文中一共展示了FileBackupHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@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);
	}
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:18,代码来源:BackupAgent.java


示例2: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@Override
public void onCreate() {
	// TODO Auto-generated method stub
	FileBackupHelper helper1 = new FileBackupHelper(this, db1);
	addHelper(db1, helper1);

	FileBackupHelper helper2 = new FileBackupHelper(this, db2);
	addHelper(db2, helper2);

	FileBackupHelper helper3 = new FileBackupHelper(this, db3);
	addHelper(db3, helper3);

	FileBackupHelper helper4 = new FileBackupHelper(this, db4);
	addHelper(db4, helper4);

	FileBackupHelper helper5 = new FileBackupHelper(this, db5);
	addHelper(db5, helper5);

}
 
开发者ID:Falimbert,项目名称:BgLogger,代码行数:20,代码来源:MyBackupAgent.java


示例3: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@Override
public void onCreate() {
	
	Log.d(LOG_TAG, "on create backup agent");
	Log.d(LOG_TAG, CURRENT_GAME_FILENAME);
	Log.d(LOG_TAG, GAME_STATS_FILENAME);
	
	FileBackupHelper helper = new FileBackupHelper(this, CURRENT_GAME_FILENAME, GAME_STATS_FILENAME);
       
	/*
	SharedPreferencesBackupHelper helper =
               new SharedPreferencesBackupHelper(this, GAME_PREFS_FILENAME);
	*/
	
	addHelper(FILES_BACKUP_KEY, helper);
	
}
 
开发者ID:TylerCarberry,项目名称:2048-Battles,代码行数:18,代码来源:TheBackupAgent.java


示例4: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
/**
 * The {@link android.app.backup.FileBackupHelper FileBackupHelper} class
 * does nearly all of the work for our use case:  backup and restore of a
 * file stored within our application's getFilesDir() location.  It will
 * also handle files stored at any subpath within that location.  All we
 * need to do is a bit of one-time configuration: installing the helper
 * when this agent object is created.
 */
@Override
public void onCreate() {
    // All we need to do when working within the BackupAgentHelper mechanism
    // is to install the helper that will process and back up the files we
    // care about.  In this case, it's just one file.
    FileBackupHelper helper = new FileBackupHelper(this, BackupRestoreActivity.DATA_FILE_NAME);
    addHelper(FILE_HELPER_KEY, helper);
}
 
开发者ID:sdrausty,项目名称:buildAPKsSamples,代码行数:17,代码来源:FileHelperExampleAgent.java


示例5: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@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);
}
 
开发者ID:nairbspace,项目名称:octoandroid,代码行数:10,代码来源:OctoBackupAgent.java


示例6: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    final FileBackupHelper db = new FileBackupHelper(this,
            "../databases/" + DatabaseHelper.DATABASE_NAME);
    addHelper(KEY_DB, db);
}
 
开发者ID:ultramega,项目名称:flavordex,代码行数:9,代码来源:FlavordexBackupAgent.java


示例7: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@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);

}
 
开发者ID:dragonlinux,项目名称:connectbot,代码行数:15,代码来源:BackupAgent.java


示例8: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@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);
}
 
开发者ID:GeeksEmpireNet,项目名称:GoogleCloudApp_Tutorial,代码行数:10,代码来源:BackupAPI.java


示例9: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@Override
public void onCreate() {
    Log.d(LOG_TAG, "onCreate called");

    FileBackupHelper giftwise_database = new FileBackupHelper(this, "../databases/" + DbHelper.DATABASE_NAME);
    addHelper(DbHelper.DATABASE_NAME, giftwise_database);
}
 
开发者ID:bdiegel,项目名称:android-giftwise,代码行数:8,代码来源:BackupAgent.java


示例10: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@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);
    }
 
开发者ID:rafaelcoutinho,项目名称:cowbird,代码行数:10,代码来源:APBackupAgent.java


示例11: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    FileBackupHelper helper = new FileBackupHelper(this, "one.txt", "two.txt", "three.txt");
    addHelper("myfiles", helper);
}
 
开发者ID:mightyfrog,项目名称:Key-Value-Backup-API-Sample,代码行数:8,代码来源:BackupAgent.java


示例12: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@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);
  }
 
开发者ID:wseemann,项目名称:ServeStream,代码行数:16,代码来源:BackupAgent.java


示例13: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@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);
}
 
开发者ID:ceaseless-prayer,项目名称:CeaselessAndroid,代码行数:8,代码来源:AppBackupAgentHelper.java


示例14: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@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();
}
 
开发者ID:ediTLJ,项目名称:novelty,代码行数:12,代码来源:BackupAgent.java


示例15: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@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);
}
 
开发者ID:moneymanagerex,项目名称:android-money-manager-ex,代码行数:16,代码来源:MoneyManagerBackupAgentHelper.java


示例16: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@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);
}
 
开发者ID:SafeSlingerProject,项目名称:SafeSlinger-Android,代码行数:11,代码来源:KeyBackupAgent.java


示例17: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@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);
}
 
开发者ID:Neamar,项目名称:CineTime,代码行数:8,代码来源:CineTimeBackupHelper.java


示例18: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@Override
public void onCreate() {
    FileBackupHelper filesHelper = new FileBackupHelper(this, DeviceObserver.INSTALLATION);
    addHelper(FILES_BACKUP_KEY, filesHelper);
}
 
开发者ID:matboehmer,项目名称:appkicker,代码行数:6,代码来源:InstallationBackupAgent.java


示例19: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@Override
public void onCreate() {
    FileBackupHelper helper = new FileBackupHelper(this, fileName);
    addHelper(PFILES_BACKUP_KEY, helper);
}
 
开发者ID:MPDL,项目名称:LabCam,代码行数:6,代码来源:BackupFileHelper.java


示例20: onCreate

import android.app.backup.FileBackupHelper; //导入依赖的package包/类
@Override
public void onCreate() {
    FileBackupHelper helper = new FileBackupHelper(this, BOOKMARKS_FILENAME);
    addHelper(FILES_BACKUP_KEY, helper);
}
 
开发者ID:ov3rk1ll,项目名称:KinoCast,代码行数:6,代码来源:BackupAgent.java



注:本文中的android.app.backup.FileBackupHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Request类代码示例发布时间:2022-05-21
下一篇:
Java NodeClient类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap