Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Billy S.
9 years agoNew member | Level 1
How to retrieve metadata attributes Java Core API v2
Hi,
Porting my Android app from Core API v1 to v2, I wonder how to get to metadata attributes such as modified time (server_modified / client_modified), version number, etc. from Java Core API v2. ...
Greg-DB
Dropbox Community Moderator
9 years agoHi Billy, a Metadata object like in your sample can be for either a file, folder, or deleted object, so you need cast it to the respective type, FileMetadata, FolderMetadata, DeletedMetadata, to access the properties specific to each.
For example, you can do something like this:
System.out.println(metadata.getPathLower());
if (metadata instanceof FileMetadata) {
System.out.println(((FileMetadata) metadata).getServerModified());
System.out.println(((FileMetadata) metadata).getClientModified());
System.out.println(((FileMetadata) metadata).getRev());
}
- inttestsme18 years agoExplorer | Level 3
Hi,
This works best for me. Thank you!
- alfazraza8 years agoExplorer | Level 4
For folder Metdata this worked for me...
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!