Adding Authentication to Pluto
In the previous section we implemented and tested several authentication features. In this chapter we will use this functions at the relevant places:
- In
SignInActivityimplement the following method stubs. (Just call the functions from the previous chapter, but use values from the UI.)doSignIn()doResetPassword()
- In
ManageAccountActvitiydoSignOut()doSendActivationMail()doDeleteAccount()
- In
CreateAccountActivitydoCreateAccount()
Finally clean up the options menu from our test calls.
Notes regarding SignInActivity
- Calling
finish()in an activity is closing the activity and removes it from the current activity stack. It is equivalent to using theBackbutton. Technically the lifecycle methodonDestroy()is called. The ActivityResult (if any) is propagated back to whoever launched you via onActivityResult(). Read: https://developer.android.com/reference/android/app/Activity.html#finish() - In
SignInActivityyou need to implement theonStart()lifecycle method, in order to check, if the user is authenticated. Why?
Notes regardingMainActivity
- Make sure, that you check user authentication (using Firebase).
Notes regardingManageAccountActivity
- Display account related values in the upper part of the screen.
- Explain, why and how deleting the account should be improved.