views:

248

answers:

2

What's the best way to use Amazon Simple Storage Service (S3) on Android?

For iPhone I use ASIHTTPRequest. Is there something similar for Android?

A: 

I think any S3 Java API should do it ? Look at the docs for Java API Libraries.

Toni Menzel
The AWS Java SDK requires third-party libraries that seem incompatible with Android.
hgpc
Can you give a pointer of what is incompatible ? Link Resource or Errormessage etc ?
Toni Menzel
They need third-party jars that include java.* and javax.* packages. Even if they were compatible, the jar dependencies amount to more than 6MB, which is too much for a mobile application.
hgpc
+1  A: 

To be honest I think if no library exists which works with android you will need to just roll your own. Take a look at the REST API and implement just the methods that you need for your application.

Doing it this way is more work but you will keep the filesize of your application down.

matto1990
+1 S3 is RESTful and does only expose two kinds of resources (buckets and objects). This should not be too complicated...
moxn
@moxn: writing your own generic S3 library that actually supports ACLs, etc., is reasonably complex. That being said, writing a library that serves the needs of a specific application is much less complex.
Nick Bastin
I should add that an Amazon employee recommended using this method over at the Amazon forums.
hgpc