I'm trying to send a user to an activity based off of if their email is verified and then if they have a username. My code looks like this so far:
if (isEmailVerified == true) {
if (user.displayName == null) {
startIntent(NewUserLayoutProfile)
} else {
startIntent(MainActivity)
}
}
if (isEmailVerified == false) {
startIntent(ResendEmailVerification)
}
And
private fun startIntent (theIntent: Activity) {
val i = Intent(this, theIntent::class.java)
startActivity(i)
}
How do I pass across the activity? I tried passing it as a String and that didn't work. What am I doing wrong here?