async void SimulateStartup() { Log.Debug(TAG, "Performing some startup work that takes a bit of time."); await Task.Delay(500); // Simulate a bit of startup work. Log.Debug(TAG, "Startup work is finished - starting MainActivity."); // StartActivity(new Intent(Application.Context, typeof(MainActivity))); if (VersionTracking.IsFirstLaunchEver && firebaseAuth.CurrentUser == null) { StartActivity(new Intent(Application.Context, typeof(SliderIntroActivity))); } else { if (firebaseAuth.CurrentUser != null) { Intent intent = new Intent(this, typeof(MainActivity)); intent.PutExtra("CurrentUserUid", firebaseAuth.CurrentUser.Uid.ToString()); intent.PutExtra("CurrentUserDisplayName", firebaseAuth.CurrentUser.DisplayName.ToString()); //intent.PutExtra("CurrentUserEmail", firebaseAuth.CurrentUser.Email.ToString()); string highresphoto = AppDataHelper.GetHighResPhoto(firebaseAuth.CurrentUser.Providers, firebaseAuth.CurrentUser.PhotoUrl.ToString()); intent.PutExtra("CurrentUserPhoto", highresphoto); this.StartActivity(intent); } else { StartActivity(new Intent(Application.Context, typeof(LoginActivity))); } } }
public void OnSuccess(Java.Lang.Object result) { if (!usingFirebase) { usingFirebase = true; LoginResult loginResult = result as LoginResult; var credentials = FacebookAuthProvider.GetCredential(loginResult.AccessToken.Token); firebaseAuth.SignInWithCredential(credentials).AddOnSuccessListener(this).AddOnFailureListener(this); } else { usingFirebase = false; Intent intent = new Intent(this, typeof(MainActivity)); intent.PutExtra("CurrentUserUid", firebaseAuth.CurrentUser.Uid.ToString()); intent.PutExtra("CurrentUserDisplayName", firebaseAuth.CurrentUser.DisplayName.ToString()); //intent.PutExtra("CurrentUserEmail", firebaseAuth.CurrentUser.Email.ToString()); string highresphoto = AppDataHelper.GetHighResPhoto(firebaseAuth.CurrentUser.Providers, firebaseAuth.CurrentUser.PhotoUrl.ToString()); intent.PutExtra("CurrentUserPhoto", highresphoto); this.StartActivity(intent); } progressBar.Visibility = ViewStates.Invisible; }