You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
qazimuneeb1
5 years agoExplorer | Level 3
FileMetadata
Hi, i am actually developing an android app and i have a function which runs in background of my app through alarm receiver using async task and in that i access a specific file from my dropbox using dropbox file path, update it and then upload it to dropbox. So i am using
FileMetadata metadata = (FileMetadata) client.files().getMetadata(FileNdPath);
it works fine but sometime the problem occurs when metadata gets stuck while getting data from the specific file which only contains a few line text and is a json file. After getting stuck my whole app gets stuck while waiting for the execution to procceed. What might be the problem and how can i resolve it? Is there anyway to find if the specific file is getting much time or gets stuck so that i can start the process again?
- Greg-DBDropbox Staff
Can you clarify what you mean when you say the method "gets stuck"? The getMetadata method should either return a Metadata object, if the call is successful, or otherwise raise some exception. Are neither of those happening? Are you getting any error or output in the console when this occurs?
You may want to add some additional logging as a first step for debugging this to see when/where this occurs.
- qazimuneeb1Explorer | Level 3
Method gets stuck means it doesnot return any thing and keeps on trying to fetch metadata and it doesnot end execution but again i am saying that it happens rarely but when it happens my whole execution of app gets stuck with no result. As i am executing this in background when my app is closed so i am unable to debug it. I once caught it because i did not close my app and found out that it stuck on this method using breakpoints, it doesnot return any exception either
- Greg-DBDropbox Staff
Even if the API call itself doesn't return a result or error, we'd expect the HTTPS connection itself to eventually timeout and so the client would raise a exception for the failed connection. How long did you wait when you noticed this happening?
Also, can you add logging to see when this is happening? It would be useful to see if there's any pattern, e.g., if it only happens for a particular file, for instance.
About Discuss Dropbox Developer & API
Make connections with other developers797 PostsLatest Activity: 3 days ago
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 or Facebook.
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!