views:

48

answers:

2

I am making and app on android that takes pictures using your camera, I then want to save this image to S3, but I am not sure how to do this.

+3  A: 

Taking picture on Android: here, here

Uploading file to Amazon S3: here

Edited: seems that the easiest way to upload to Amazon S3 is JetS3t. It needs a little tweak to work on Android.

Peter Knego
would it be possible to have the android application send a POST request to another web app that allows file uploading(using S3)?
Kevin
Amazon S3 is REST, which means that you can POST directly to it.
Peter Knego
Okay thanks I will try it, I am just a bit confused on it. So I should use the HttpUrlConnection api to connect directly to the S3 API? (I dont want to do work with the progress bar..yet)
Kevin
Since you need to do a POST you must use HttpClient and HttpPost. Check this example: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientChunkEncodedPost.java
Peter Knego
You could also use JetS3t http://bitbucket.org/jmurty/jets3t/wiki/Home with a simple tweak:http://stackoverflow.com/questions/2719257/jets3t-on-android
Peter Knego
Thanks a lot I will try to wrap my head around this today.
Kevin