I cannot find this anywhere. Is the android emulator able to upload files to a web server? I have been testing for the last hour or so and just realized it may not even be possible. Anyone know?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes its possible. It’s a little complex to post the code but essentially you’d use File class to find which file you want to upload and then use the apache HttpClient library to do the multiform post. Now if you think it won’t work because you don’t know what interface the user will use to find the file. There is a way to send an Intent to open a file.
Send an Intent for the user to select a file on Android
But the rest is simply writing the code to perform the upload.