Hi,
I don't succeed in copy a file using ExternalStorage.
I do:
Can someone help me?
Kind regards,
André
I don't succeed in copy a file using ExternalStorage.
I do:
B4X:
Sub imvBackup_Click
Dim Storage As ExternalStorage
Dim Inp As InputStream
Dim out As OutputStream
Storage.Initialize(Me,"")
Storage.SelectDir(False)
Wait For Storage_ExternalFolderAvailable
Inp=File.OpenInput(Main.DBFilePath,Main.DBFileName)
out=Storage.OpenOutputstream(Storage.CreateNewFile(Storage.root,Main.DBFileName))
Wait For (File.Copy2Async(Inp, out)) Complete (Success As Boolean)
out.Close
Inp.Close
' If(File.Exists(Storage.Root.Name,Main.DBFileName)) Then
MsgboxAsync("Backup voltooid","")
' Else
' MsgboxAsync("Backup mislukt!! Probeer het nogmaals","")
' End If
End Sub
Can someone help me?
Kind regards,
André