AndroidAPS/app/src/main/java/info/nightscout/androidaps/utils/SPBackupAgent.java

17 lines
560 B
Java
Raw Normal View History

package info.nightscout.androidaps.utils;
import android.app.backup.BackupAgentHelper;
import android.app.backup.SharedPreferencesBackupHelper;
public class SPBackupAgent extends BackupAgentHelper {
@Override
public void onCreate() {
2020-05-12 00:04:09 +02:00
// API 24
final String PREFS = getApplicationContext().getPackageName() + "_preferences";
final String PREFS_BACKUP_KEY = "SP";
SharedPreferencesBackupHelper helper =
new SharedPreferencesBackupHelper(this, PREFS);
addHelper(PREFS_BACKUP_KEY, helper);
}
}