Android Question Send file from PC to Android and back

I don't think, that is what i searched for. Couldn't it be as easy as VB.net to VB.net, over sockets or Base64 and TCP ?
This is how it should work:
On my PC (VB.net) is the server and on my phone is the client. If the client connects, the sever sends a list of songtitles, which the client receives and shows. Then you choose a songtitle on the client and it sends the title to the server. There the server sends the song which is related to the title and the client receives and plays the song.
 

Erel

Administrator
Staff member
Licensed User
Do you mean the B4J application?

Try to connect from the desktop to the device. The other way will only work if you open a port in Windows firewall.

I don't think, that is what i searched for. Couldn't it be as easy as VB.net to VB.net, over sockets or Base64 and TCP ?
The simplest way to communicate between an Android device and a desktop is by using B4J and B4A.

However you can also write the desktop program with VB.Net. Just make sure not to use prefix mode: http://www.b4x.com/android/forum/threads/7669/#content
 
There are no errors. With the VB.net application, which I uploaded before, i can connect from emulator to pc with the ip 192.168.2.102 but with the B4J it doesn't work.

EDIT: I found an error: (SocketException) java.net SocketException Socket closed
 
Last edited:
Ok, now i found something to fix a bit. I can now connect from emulator to server(b4j). But the server doesn't notice that. Could you test the two project, if they work for you, how I want to ?
 

Beja

Expert
Licensed User
In addition to Erel's solution you can also think about this one.
Use the mini email-based server to send the file as attachment to an email.
http://www.b4x.com/android/forum/threads/building-a-mini-email-based-server.35030/#content
The process is initiated from the Android device app, where you can include the email 'send' request in any form of a string variable.. when server received your request (by bluetooth, email, etc).. then it will send you the file by email as attachment. After your device app sends the request then it will be polling the email for incoming (Valid) email message, you can then download and process the attachment. You do the same thing the other way round.
 
Top