public async void accpetTerms() { AndroidLoginManager loginManager = AndroidLoginManager.Instance(activity.ApplicationContext); string email = loginManager.GetUsername(); AccountManager acm = new AccountManager(); TravelerModel traveler = await acm.GetTravelerByEmail(email); traveler.InformedConsent = true; traveler.InformedConsentDate = DateTime.UtcNow; traveler = await acm.UpdateTraveler(traveler); Intent intent = new Intent(activity.ApplicationContext, typeof(HomeActivity)); activity.StartActivity(intent); activity.Finish(); }
public async void OnResume() { view.ShowBusy(true); AndroidLoginManager loginManager = AndroidLoginManager.Instance(activity.ApplicationContext); if (!await loginManager.IsLoggedIn()) { GoToLoginActivity(); } else { username = loginManager.GetUsername(); view.ShowUserInfo(username); AccountManager acm = new AccountManager(); TravelerModel traveler = await acm.GetTravelerByEmail(username); view.ShowPromoCode(traveler.PromoCode); } view.ShowBusy(false); }