Backup markers

This commit is contained in:
PavelRatushnyi 2017-09-09 20:57:44 +03:00
parent fbcf727a25
commit 5df52cd5ed
2 changed files with 5 additions and 3 deletions

View file

@ -6,6 +6,8 @@ import android.app.backup.BackupAgentHelper;
import android.app.backup.FileBackupHelper;
import android.app.backup.SharedPreferencesBackupHelper;
import net.osmand.plus.mapmarkers.MapMarkersDbHelper;
/**
* Requires android API from android-8
*/
@ -25,7 +27,7 @@ public class OsmandBackupAgent extends BackupAgentHelper {
SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, prefs);
addHelper("osmand.settings", helper);
FileBackupHelper fileBackupHelper = new FileBackupHelper(this, FavouritesDbHelper.FILE_TO_BACKUP);
addHelper(FavouritesDbHelper.FILE_TO_BACKUP, fileBackupHelper);
FileBackupHelper fileBackupHelper = new FileBackupHelper(this, FavouritesDbHelper.FILE_TO_BACKUP, "../databases/" + MapMarkersDbHelper.DB_NAME);
addHelper("osmand.files", fileBackupHelper);
}
}

View file

@ -20,7 +20,7 @@ import java.util.Random;
public class MapMarkersDbHelper {
private static final int DB_VERSION = 2;
private static final String DB_NAME = "map_markers_db";
public static final String DB_NAME = "map_markers_db";
private static final String MARKERS_TABLE_NAME = "map_markers";
private static final String MARKERS_COL_ID = "marker_id";