Writing Files over shared LAN folder

The title says everything. I want to create and read files from my phone to my pc.

I created a folder in Documents/TestFolder
Right Click -> Properties -> Share -> Everyone(Read+Write).
I am left with this: //192.168.0.94/Users/TeoV/Documents/Apps/FolderTestLan/txtTest.txt

I tried using createWriter(“see above”); from my pc and it successfully created the file. So i just guessed that it works from any pc connected to the same network.

But when i switched to the android version i got this:

java.io.FileNotFoundException: /192.168.0.94/Users/TeoV/Documents/Apps/FolderTestLan/txtTest.txt (No such file or directory) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(FileOutputStream.java:287) at java.io.FileOutputStream.<init>(FileOutputStream.java:223) at java.io.FileOutputStream.<init>(FileOutputStream.java:171) at processing.core.PApplet.createWriter(PApplet.java:4863) at processing.core.PApplet.createWriter(PApplet.java:4853) at processing.test.bmw_mobile.BMW_Mobile.setup(BMW_Mobile.java:26) at processing.core.PApplet.handleDraw(PApplet.java:1846) at processing.core.PSurfaceNone.callDraw(PSurfaceNone.java:476) at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:516) FATAL EXCEPTION: Animation Thread Process: processing.test.bmw_mobile, PID: 17980 java.lang.RuntimeException: Couldn't create a writer for /192.168.0.94/Users/TeoV/Documents/Apps/FolderTestLan/txtTest.txt at processing.core.PApplet.createWriter(PApplet.java:4875) at processing.core.PApplet.createWriter(PApplet.java:4853) at processing.test.bmw_mobile.BMW_Mobile.setup(BMW_Mobile.java:26) at processing.core.PApplet.handleDraw(PApplet.java:1846) at processing.core.PSurfaceNone.callDraw(PSurfaceNone.java:476) at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:516)

How can i read and write files over LAN with the android mode?

Usually when I want to access data from my computer, I will use something like shareit or pushbullet. I know shareit will do the transfer over wifi. You need to install the app in both devices.

To consider, ip addresses in dynamic networks are not fixed. You also need to work with your firewall, so I understand from some posts. Follow the lead in the next links:

Notice that the solutions above do not offer you a solution to integrate data access from Processing Android. It only shows some ways to access files from the network. Related to createWriter(), I am going to guess and say the function calls under the hood are different for Processing Java and Android. You can dive into the source code and explore it yourself.

Kf