Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File transfer using socket communication

 
Asif Kadiwala
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we create two way socket communication for file transfer?? Means Transferring files from Desktop PC to Android device and vice versa. And Is it possible to store the files in the device other than SD card???
 
Mark L. Murphy
Author
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we create two way socket communication for file transfer?? Means Transferring files from Desktop PC to Android device and vice versa.


Network sockets, yes. Android supports standard Java sockets, so anything that uses those has a decent shot of working.

And Is it possible to store the files in the device other than SD card???


Yes, but depending upon the device, there may be very little storage on the device itself. In the case of the T-Mobile G1, we're talking 70MB total. Other devices may have substantially more, of course.
 
Asif Kadiwala
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,

Thanks for your reply. Is it possible to store files received using socket communication from desktop to the emulator other than SD card?? How much memory emulator has??

For the socket communication, is there any API available to send files??
 
Mark L. Murphy
Author
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to store files received using socket communication from desktop to the emulator other than SD card??


Yes. Each application has its own private file storage area.

How much memory emulator has??


Honestly, I do not know.

For the socket communication, is there any API available to send files??


There are two HTTP APIs in Android (URLConnection and Apache HttpClient). HttpClient definitely supports PUT and POST operations for sending files.
 
Derek Cram
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do HTTP and FTP communication. However, as far as I know you cannot have incoming socket to Android device. For FTP it means that you cannot use Active mode.
Only passive mode can work. We've a FTP client that will show that socket communication works: http://www.lysesoft.com/products/andftp/index.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic