private static void Init() { if (Account == null) { if (AccountStore == null) { AccountStore = Xamarin.Auth.AccountStore.Create(); } if (AccountStore == null) { throw new Exception("Account Store not Supported"); } try { Account = AccountStore.FindAccountsForService(APP_NAME_KEY).FirstOrDefault(); } catch { Account = null; } if (Account == null) { Account = new Xamarin.Auth.Account { Username = USERNAME_FOR_SS }; AccountStore.Save(Account, APP_NAME_KEY); } } }
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. Xamarin.Auth.AccountStore accountStore = Xamarin.Auth.AccountStore.Create(); var accounts = accountStore.FindAccountsForService("someid"); return; }
public IAccountStore xCreate() { #if __ANDROID__ xAccountStore = Xamarin.Auth.AccountStore.Create(Auth.context); // context may be all wrong #elif __IOS__ xAccountStore = Xamarin.Auth.AccountStore.Create(); #elif SILVERLIGHT xAccountStore = Xamarin.Auth.AccountStore.Create(); #endif return(this); }
public IAccountStore xCreate() { #if __ANDROID__ xAccountStore = Xamarin.Auth.AccountStore.Create(Auth.context); // context may be all wrong #elif __IOS__ xAccountStore = Xamarin.Auth.AccountStore.Create(); #elif SILVERLIGHT xAccountStore = Xamarin.Auth.AccountStore.Create(); #endif return this; }