Skip to content

Instantly share code, notes, and snippets.

@fatihhcan
Created July 25, 2020 13:52
Show Gist options
  • Save fatihhcan/93fd87fdfda67898be02a682c0d0b2f3 to your computer and use it in GitHub Desktop.
Save fatihhcan/93fd87fdfda67898be02a682c0d0b2f3 to your computer and use it in GitHub Desktop.
private fun yeniUyeKayit(mail: String, sifre: String) {
progressBarGoster()
FirebaseAuth.getInstance().createUserWithEmailAndPassword(mail,sifre)
.addOnCompleteListener(object:OnCompleteListener<AuthResult>{
override fun onComplete(p0: Task<AuthResult>) {
if(p0.isSuccessful){
Toast.makeText(this@RegisterActivity,"Üye kaydedildi:"+FirebaseAuth.getInstance().currentUser?.email, Toast.LENGTH_SHORT).show()
mailGonder()
FirebaseAuth.getInstance().signOut()
}else{
Toast.makeText(this@RegisterActivity,"Üye kaydedilirken sorun oluştu:"+p0.exception?.message, Toast.LENGTH_SHORT).show()
}
}
})
progressBarGizle()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment