Hi,
My app can backup the db to the DirRootexternal and restore it to Dirinternal.
All works ok in Android 4
In Android 5 Im having a problem, this is the code:
I catch the error "Error restoring" but the db restore is made OK.
Then I thought the Error comes from the sql insert, how can I catch this and know which is the error.
It works ok in Android 4, same app in Android 5 fails.
Thanks
My app can backup the db to the DirRootexternal and restore it to Dirinternal.
All works ok in Android 4
In Android 5 Im having a problem, this is the code:
B4X:
If File.Exists(File.DirRootExternal&"/armi.portit.backcup", "portit.db")=True Then
StopService(LeeWebDelay)
Try
File.Copy(File.DirRootExternal&"/armi.portit.backcup", "portit.db", File.DirInternal, "portit.db")
'File.Copy(File.DirDefaultExternal, "Params", File.DirInternal, "Params")
sql1.ExecNonQuery("INSERT INTO logevent VALUES('"&DateTime.now&"','mAjustes',0,'Restoring from SD')")
Catch
Msgbox("Error restoring.","Atention!")
End Try
Else
Msgbox("There's no backup.","Atention!")
End If
I catch the error "Error restoring" but the db restore is made OK.
Then I thought the Error comes from the sql insert, how can I catch this and know which is the error.
It works ok in Android 4, same app in Android 5 fails.
Thanks