0

How can I send a small file of 4-16 MB to android application from a java program on computer?

I am writing both android application to receive file and java program to nd file. Both of them are connected to internet.

Anthon
  • 69,918
  • 32
  • 186
  • 246
Nis
  • 449
  • 4
  • 13
  • Take a look at this http://stackoverflow.com/questions/10417442/client-server-file-transfer-from-android-to-pc-connected-via-socket – Titus Jun 05 '15 at 01:38

1 Answers1

0

I think the simplest way is this:

1 Set up apache on your server,put the file in the apache default folder,for example /var/www/html,so the file can be accessed through internet via URL;

2 Send the URL to your app,you can use push,or socket connection;

3 In your app ,start a http connection to the file,get the file stream,and write to SD card;

Ai Hao
  • 102
  • 5