2020-02-20 03:00:37 +01:00
|
|
|
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";
|
2020-02-20 03:00:37 +01:00
|
|
|
SharedPreferencesBackupHelper helper =
|
|
|
|
new SharedPreferencesBackupHelper(this, PREFS);
|
|
|
|
addHelper(PREFS_BACKUP_KEY, helper);
|
|
|
|
}
|
|
|
|
}
|