You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
666 B
18 lines
666 B
package org.r3pek.pharmacies.backup;
|
|
|
|
import android.app.backup.BackupAgentHelper;
|
|
import android.app.backup.SharedPreferencesBackupHelper;
|
|
|
|
public class MyBackupAgent extends BackupAgentHelper {
|
|
// A key to uniquely identify the set of backup data
|
|
private static final String PREFS_BACKUP_KEY = "prefs";
|
|
|
|
public void onCreate() {
|
|
// Ugly hack, but I can't get the defaultSharedPreferences filename elsewhere
|
|
final String PREFS_NAME = getPackageName() + "_preferences";
|
|
|
|
SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, PREFS_NAME);
|
|
addHelper(PREFS_BACKUP_KEY, helper);
|
|
}
|
|
|
|
}
|
|
|