Android Question SaveAs procedure. Using binary file?

Mahares

Expert
Licensed User
Longtime User
Can anyone help me to use this file and copy to the target selected with the SaveAs code?

I think this is the way. I have not used for a while:
B4X:
Wait For (SaveFile(File.OpenInput(File.DirInternal, "db1.db"), "application/octet-stream", "db1.db")) Complete (Success As Boolean)
 
Upvote 0

Juan Vargas (Bioagro)

Member
Licensed User
I think this is the way. I have not used for a while:
B4X:
Wait For (SaveFile(File.OpenInput(File.DirInternal, "db1.db"), "application/octet-stream", "db1.db")) Complete (Success As Boolean)
Thanks. I did. Im getting this message
B4X:
Unexpected event (missing RaiseSynchronousEvents): ion_event
Check the unfiltered logs for the full stack trace.
** Activity (main) Pause, UserClosed = false **
not closed

Also, any way to create a directory in the destination selected?
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Check the unfiltered logs for the full stack trace.
All I can tell you is check your unfiltered logs and see if you can close in on your issue by unchecking the filter in the logs pane on the right side of IDE.
I had a chance to test the code with B4A 12.80, OS 13 and it worked for me. I saved the db file from xui.defaultfolder to DCIM\Camera\myfolder ( it allowed me to create the myfolder subfolder prior to saving. ). I then I copied the 7.45 MB db file my PC via explorer and was able to open it via DB Browser on PC with no corruption or issues.
 
Last edited:
Upvote 0
Top