asked in Softwares+OS+Programming by (57 points) 2 10 23
replied by VISIONARY (9,060 points) 5 21 52

I sure hope that you're a programmer and can write and understand coding. This is what it will take for you to upload a file from your Android device to a server. The coding is extremely long and will take time to write it. However, I did find this code online that you can use. Here is the link to the website and the code so that you can accomplish the task and write the batch file or coding necessary to do what you want to do. Android Upload File

Please log in or register to answer this question.

1 Answer

0 thanks
answered by (326 points) 1 2 6
The very basic is that Android code is written in Java language. As with any programming language , we can use the File source, fetch the file object which in this case is a .txt file, that needs to be uploaded to the server. Before doing any further processing with the source file, make a check if the source file actually exists in the path, if not please skip and terminate.

If the source file does exist, allocate a new object of FileInputStream with the source file. Open a new network URL connection and set the content type, filename etc in the request parameters of this newly created request. Create the new data output stream and perform a file write, which will upload the file into the destination server.

Related questions

0 answers 0replies
2 answers 0replies
asked Aug 3, 2017 in Blog+Seo+Internet by Erina (271 points) 2 10 36

3,187 questions

9,858 answers

4,647 replies

2,538 users

Most active Members
October 2019:
  1. Leyley - 38 activities
  2. skyex - 8 activities
  3. ochaya oscar james - 8 activities
  4. traiti - 7 activities
  5. LydiaC3006 - 6 activities
  6. Shiv Prakash - 6 activities
  7. Maxime - 5 activities
  8. lincy - 4 activities
  9. DuncanLane91 - 4 activities
  10. merleneNMS - 4 activities
Most answered Members
September 2019:
  1. Leyley - 25 answers
  2. amnelso - 4 answers
  3. Leiah Watkins - 2 answers
  4. lincy - 1 answers
  5. carlclear - 1 answers
  6. Marvin James 1 - 1 answers
  7. greencrayon - 1 answers
  8. Jolejnik - 1 answers
  9. Jasmin - 1 answers
  10. scoopity - 1 answers