I do not know how to do it although I already looked for a solution on the Internet. I want to replay my backup database in Android.
Currently, I am creating a backup of my database like that:
final File[] databases = new File(context.getFilesDir().getParentFile().getPath() + "/databases").listFiles();
for (File databaseFile: databases) {
File backupFile = new File(context.getExternalFilesDir(null), databaseFile.getName() + "-" + System.currentTimeMillis() + ".db");
FileChannel inputChannel = null;
FileChannel outputChannel = null;
if(databaseFile.getName().startsWith("DATABASE")) {
try {
inputChannel = new FileInputStream(databaseFile.getAbsolutePath()).getChannel();
outputChannel = new FileOutputStream(backupFile).getChannel();
outputChannel.transferFrom(inputChannel, 0, inputChannel.size());
...
Now I would like to replay my backup since I have changed my mobile phone and I need my data on the new phone.
If somebody know a way how I can do that?
Thank you very much in advance.
You basically reverse the process.