Android Question Using "wait for" with SMB or incorrect "url"?

vecino

Well-Known Member
Licensed User
Longtime User
Hi, I need to use SMB for a small project and I'm seeing that it doesn't use "wait for" but it launches "ListCompleted" and "DownloadCompleted", my question is if it can be used somehow something like:
B4X:
wait for (smb1_ListCompleted (Url As String, Success As Boolean, Entries() As SMBFile) complete (...)
Thanks.
 

vecino

Well-Known Member
Licensed User
Longtime User
I answer myself.
B4X:
Wait For SMB1_DownloadCompleted (Url As String, RemoteFile As String, Success As Boolean)
 
Upvote 1

vecino

Well-Known Member
Licensed User
Longtime User
It does not seem to work.
B4X:
SMB1.ListFiles( cRutaFilesSMB, "*.txt")
Wait For SMB1_ListCompleted (Url As String, Success As Boolean, Entries() As SMBFile)
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
Hi, I think I have found the problem, and I don't know if I should open another thread. Sorry if it doesn't go here.

Example of the problem:
The path to download files is:
B4X:
cPathRemoteFilesSMB = "smb://192.168.1.99/files/"
And the error seems to be because one slash is missing, how can I indicate to you that it is two slashes?
java.io.FileNotFoundException: smb:/192.168.1.99/files/01020304.txt: open failed: ENOENT (No such file or directory)
The error says: smb:/192... instead of smb://192....
How can I solve it?
Thank you.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top