Reputation: 55533
I have been doing some research, and for the life of me, I cannot find any documentation on how to use the android dropbox SDK. I have authenticated the user, but now I cannot figure out how the get the metadata (file entries) of a folder. I have looked at the Web docs, but the arguments in java are turned around, flipped over, and then some.
In objective-c, the methods are straight forward, and I understand what is going on. Must I port the code from objective-c to java?
Upvotes: 5
Views: 2973
Reputation: 6798
As far as I can tell as of Sep 20, 2011, Dropbox still hasn't put the Android SDK documentation. Here are some workarounds:
[EDIT by anotheranon user] My friend stumbled upon this official documentation from Dropbox. Don't even know how he found it. Since this thread is also where I gave up I would like to share!
Upvotes: 2
Reputation: 941
In the SDK (DropboxSample), this will list the files in the Public folder of the user account:
In DropboxSample.java add:
public void displayFiles(DropboxAPI.Account account) {
if (account != null) {
DropboxAPI.Entry dbe = api.metadata("dropbox", "/Public", 10000, null, true);
List<Entry> contents = dbe.contents;
if (contents != null) {
for (Entry ent:contents) {
Toast.makeText(this, ent.fileName(), Toast.LENGTH_SHORT).show();
}
}
}
}
In LoginAsyncTask.java add:
mDropboxSample.displayFiles(mAccount);
below mDropboxSample.displayAccountInfo(mAccount);
Upvotes: 0
Reputation: 71
You should be to find your answer here: https://www.dropbox.com/developers. Looks like the SDK is undocumented.
Try making the calls to the API directly.
Upvotes: 0