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
nzmike
7 years agoExplorer | Level 3
Android API - listfolder returns nothing
I have to admit here that I'm both new to Android and new to the DropBox API (but not new to development) so maybe I'm doing something wrong but I cannot get listFolder to return any files no matter ...
- 7 years agoJust registering an app (i.e., creating it on the App Console), does not automatically create the "app folder" in your account. The app folder is only created in the account once the app is "linked" to the account (i.e., when the user goes through the OAuth app authorization flow to authorize the app to connect to their account, or, for the account that owns the app, when you click the "Generate" button on the app's page on the App Console to get an access token for your app-account pair).
You don't need to delete or recreate any app or folder, nor do you need to make an API call to determine the path. (Apps with the app folder permission don't need to know the full path of the app folder. All paths in API calls made by apps with the app folder permission are automatically used relative to the app folder.)
I recommend going to https://www.dropbox.com/ to browse your account. Assuming your account is set to English, the app folder(s) will be inside a folder named "Apps".
There's an example Android app here:
https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android
nzmike
Explorer | Level 3
Hi Greg, many thanks for the answer.
I already had an Apps folder in my DropBox (created by me a while back for another purpose) and when I add a new app to the dashboard the app folder is not being created within Apps - could the fact that I created the Apps folder myself be the issue?
Since the dashboard didn't create the appropriate app folder I went ahead and created it myself (e.g: Apps/MyTestApp1) and copied files to it but still nothing is picked up.
Perhaps I should I delete my Apps folder, delete the app from my dashboard and start again?
Alternatively, is there an API call that I can use to find what DropBox thinks the default folder is? (I'll look up the API docs as well of course)
Finally, just so I'm really clear, can you confirm that if I go into my dashboard and create a new app, say MyTestApp2, then when I refresh my DropBox there should a MyTestApp2 folder inside the Apps folder? I'm just concerned I'm missing some really fundamental step that may be obvious to experienced DropBoxAPI users but perhaps not to first-timers like me. I was unable to find an Android app example from scratch so I'm just using scraps of knowledge from all over the place.
Greg-DB
7 years agoDropbox Staff
Just registering an app (i.e., creating it on the App Console), does not automatically create the "app folder" in your account. The app folder is only created in the account once the app is "linked" to the account (i.e., when the user goes through the OAuth app authorization flow to authorize the app to connect to their account, or, for the account that owns the app, when you click the "Generate" button on the app's page on the App Console to get an access token for your app-account pair).
You don't need to delete or recreate any app or folder, nor do you need to make an API call to determine the path. (Apps with the app folder permission don't need to know the full path of the app folder. All paths in API calls made by apps with the app folder permission are automatically used relative to the app folder.)
I recommend going to https://www.dropbox.com/ to browse your account. Assuming your account is set to English, the app folder(s) will be inside a folder named "Apps".
There's an example Android app here:
https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android
You don't need to delete or recreate any app or folder, nor do you need to make an API call to determine the path. (Apps with the app folder permission don't need to know the full path of the app folder. All paths in API calls made by apps with the app folder permission are automatically used relative to the app folder.)
I recommend going to https://www.dropbox.com/ to browse your account. Assuming your account is set to English, the app folder(s) will be inside a folder named "Apps".
There's an example Android app here:
https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android
- nzmike7 years agoExplorer | Level 3
Hi Greg, sorry it's taken a while to reply, have been away for a few days.
I think the issue was something to do with me having already created the Apps folder well before I started my Android app - rather than using Windows Explorer (which was showing the files in the Apps/<appname> folder when I went to Dropbox.com I could see they had not been synched. When I tried to do that I got a synching error in Explorer and it showed two Apps folders, one with an error next to it. I deleted the one I created manually and moved some test files to the <appname> folder and re-ran my app and now it does return the files in the Apps/<appname> folder.
Many thanks for your help :-)
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,912 PostsLatest Activity: 2 months agoIf 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!