Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Anoop_Brijmohun
8 years agoHelpful | Level 6
Xamarin Login issues
Hi guys,
im pretty new to xamarin and api's.
was working with the example seen here https://www.dropbox.com/developers/documentation/dotnet#tutorial
so i have managed to get the UWP working.
on my Android project the app just hangs and crashes
try
{
DropboxClient dbx = new DropboxClient("TOKEN HERE");
using (dbx)
{
var list = await dbx.Files.ListFolderAsync(string.Empty); // crashes here
// show folders then files
foreach (var item in list.Entries.Where(i => i.IsFolder))
{
Console.WriteLine("D {0}/", item.Name);
}
foreach (var item in list.Entries.Where(i => i.IsFile))
{
Console.WriteLine("F{0,8} {1}", item.AsFile.Size, item.Name);
}
}
anyone have a simple working example or can assist with the above
4 Replies
- Greg-DB8 years ago
Dropbox Community Moderator
What error message and stack trace are you getting when it crashes on ListFolderAsync?
- Anoop_Brijmohun8 years agoHelpful | Level 6
Hi, no stacktrace or anthing. just returns null and exits method.
- Greg-DB8 years ago
Dropbox Community Moderator
I'm not sure I follow. You originally said it crashes on that method, but now you've said it actually returns null. Neither is supposed to happen, but please elaborate on exactly what you are seeing. You may want to add some extra logging, or step through with a debugger. (Is list actually null, or is list.Entries empty perhaps?)
We don't officially support Xamarin, but we'll be happy to take a look to see if there's an API-level issue.
- Anoop_Brijmohun8 years agoHelpful | Level 6
Hi
sorry about that, the problem ended up being the actual project.
had to clean project and restart VS.
thanks for your help
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!