Is there a limitation to utilizing GetSafeDirDefaultExternal with the above code on < 29? That's my default location for images 29+ and I can't get these images in the gallery on older devices.
Same code works successfully with DirRootExternal. Now I have 2 copies of the image on disk though. Without writing everything in parallel, is there a way to just stay consistent with GetSafeDirDefaultExternal?
Yes. Both run fine, no errors, but safedir does not add to Gallery on SDK 28.
This works.
B4X:
MyFilePath = File.DirRootExternal & "/MyApp"
Dim out As OutputStream = File.OpenOutput(MyFilePath, "MyDir/" & TargetName, False)
File.Copy2(In, out)
out.Close
Dim FilePath As String = File.Combine(MyFilePath, "MyDir/" & TargetName)
This does not (file is there and same path for sdk 29+)
B4X:
MyFilePath = rp.GetSafeDirDefaultExternal("MyApp")
Dim out As OutputStream = File.OpenOutput(MyFilePath, "MyDir/" & TargetName, False)
File.Copy2(In, out)
out.Close
Dim FilePath As String = File.Combine(MyFilePath, "MyDir/" & TargetName)