My app has need to copy a file from the downloads folder.
This works fine except with Oreo. Is this a fuction of this android version or a function of my Oreo device (Huawei P20)?
I am using <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="26"/>
The move code that I am using is as follows:
This works fine except with Oreo. Is this a fuction of this android version or a function of my Oreo device (Huawei P20)?
I am using <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="26"/>
The move code that I am using is as follows:
B4X:
FileMove(File.Combine(File.DirRootExternal, "Download"), "TTBcopy.dback",File.DirDefaultExternal, "TTB.db")
.
.
.
Sub FileMove(SourceFolder As String, SourceFile As String, TargetFolder As String, TargetFile As String) As Boolean
Dim source, target As JavaObject
Log(SourceFolder &" " & SourceFile &" to " & TargetFolder & " " & TargetFile)
source.InitializeNewInstance("java.io.File", Array(SourceFolder, SourceFile))
target.InitializeNewInstance("java.io.File", Array(TargetFolder, TargetFile))
Return source.RunMethod("renameTo", Array(target))
End Sub