cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Xamarin Login issues

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
Highlighted

Re: Xamarin Login issues

Dropboxer
Dropboxer

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

Highlighted

Re: Xamarin Login issues

Helpful | Level 6

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

Highlighted

Re: Xamarin Login issues

Dropboxer
Dropboxer

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. 

Highlighted

Re: Xamarin Login issues

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

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?