cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Xamarin Login issues

Xamarin Login issues

Anoop_Brijmohun
Helpful | Level 6

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 4

Greg-DB
Dropbox Staff

What error message and stack trace are you getting when it crashes on ListFolderAsync?

Anoop_Brijmohun
Helpful | Level 6

Hi, no stacktrace or anthing. just returns null and exits method.

Greg-DB
Dropbox Staff

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_Brijmohun
Helpful | 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

Need more support?