Account Manager Future - how to get this result

darrell.tunnelldarrell.tunnell USMember ✭✭
edited November 2017 in Xamarin.Android

I am calling the Android Account Manager GetAccountsByTypeAndFeatures.

It is returning a Future with a Result property. It looks like this:

I can't seem to work out how to cast the result from JavaObject into something meaningful. Everything I try doesn't work:

                    var perhapsItsAJavaArray= future.Result as JavaArray<Account>; 
                   // The following isn't allowed:
                   // var perhapsItsAJavaArray= future.Result as Account[];
                    var perhapsItsASingleAccount = future.Result as Account;

Any ideas anyone?

I can see from the watch window that the result should be an array of Account objects but I can't figure out how to get typed access to them.

Sign In or Register to comment.