Reading string from file over local network

GMan

Well-Known Member
Licensed User
Longtime User
I try to read out a string from a file which was on another computer in the same wlan network.

The directory and file was shared, so i can have access via the net (this works fine between 2 pcs).

The found relations to this topic mostly handles access via port 80 (http), but this i dont want to use.

Here is my code so far:

B4X:
Dim datastring as string
datastring = File.ReadString(datapath, "stringfile.txt")
The datapath "//pc/testdir/" was read from a map file and works fine (the reading) but not with the app.

An error occurs: ...(no such file or directory)
 

stevel05

Expert
Licensed User
Longtime User
I don't know this one but you will need something like HotShoe's Library that handles Samba.
 
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
I dl the Lib, but the link to the needed .jar file is broken :(
 
Upvote 0

grant1842

Active Member
Licensed User
Longtime User
The problem is that if you're sharing the file on a Windows machine, then Android doesn't have the same communication protocol as Windows for networking. As Steve said, the samba library let you communicate with the Windows network using the correct protocol.
 
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
I dl that and put it in to the lib file.
First error was: the ... for build.xml was not found.

Then i deleted the three files from the lib folder, and when i now start B4A i got an error:
Error parsing libraries.
The given key has no entry in the dictionary

And my project wasnt loaded any longer :sign0085:
 
Last edited:
Upvote 0

stevel05

Expert
Licensed User
Longtime User
As I said, I don't know about that Library and haven't installed it. It looks like you may have deleted something else from the Library Directory, are the file still in your wastebasket, can you put them back?

I would start a new thread making it clear that it's a new question about the Library.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
I hope someone can sort you out soon.

Just a thought, is the library still selected in the project, can you open a different project?

Ooops, I'll post it in the new thread!
 
Upvote 0
Top