public class MyBackupAgent extends BackupAgentHelper {
static final String DB_FILE_NAME = "name";
static final String DB_BACKUP_KEY = "key";
@Override
public void onCreate() {
FileBackupHelper dbs = new FileBackupHelper(this, getFilesPath());
addHelper(DB_BACKUP_KEY, dbs);
}
private String getFilesPath() {
File path = getDatabasePath(DB_FILE_NAME);
return path.getAbsolutePath();
}
}
报告的输出为:
04-27 21:54:13.681: V/BackupManagerService(1087): addPackageParticipantsLocked: #1
04-27 21:54:13.681: I/BackupManagerService(1087): Scheduling backup for new app my.package
04-27 21:54:13.681: D/BackupManagerService(1087): Now staging backup of my.package
04-27 21:55:11.621: D/BackupManagerService(1087): couldn't find params for token 0
有什么问题?
暂无答案!
目前还没有任何答案,快来回答吧!