• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Firebase Auth Implementation Problem

baboncjusz

Lurker
Nov 15, 2023
1
0
Hey,
I have an application project where BaseActivity.kt is a class inherited by others. I am having trouble implementing Firebase in the PageLoginActivity.kt and PageSignUpActivity.kt classes. Could someone help me? I’ve been working on this for three days, and it’s slowly killing me… Below, I will add piece of the codes.

BaseActivity.kt
abstract class BaseActivity(@LayoutRes val layoutId: Int) :
AppCompatActivity(), BaseControllerFunctionsImpl {
lateinit var binding: T

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = DataBindingUtil.setContentView(this@BaseActivity, layoutId) as T
binding.lifecycleOwner = this
addObservers()
setUpClicks()
onInitialized()
}


(…)

PageLoginActivity.kt
class PageLoginActivity : BaseActivity(R.layout.activity_page_login) {
private val viewModel: PageLoginVM by viewModels()

override fun onInitialized(): Unit {
viewModel.navArguments = intent.extras?.getBundle(“bundle”)
binding.pageLoginVM = viewModel
}
(…)

PageSignUpActivity.kt
class PageSignupActivity : BaseActivity(R.layout.activity_page_signup) {

private val viewModel: PageSignupVM by viewModels()

override fun onInitialized() {
viewModel.navArguments = intent.extras?.getBundle(“bundle”)
binding.pageSignupVM = viewModel
}
(…)

Thank you in advance.
Regards,
PZ
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones