Exercise Wednesday

Goal: Learn about the user authentication process by following along with the homework to add user accounts into your MyRestaurants application. Then, get extra practice with both user auth and event listeners by crafting an instant messaging application, paying special attention to the manner listeners instantaneously update a user's app with new messages as they're received.

Warm Up

  • What is an intent filter? What does it do or prevent you from doing?
  • How does a SearchView work? How is it different from other views?
  • What other Firebase methods can you name? What do they do, and when would you use them?




Follow along with lessons listed under Wednesday (today), in order to begin implementing user authentication into your MyRestaurants application. This includes account registration, saving user information to our database, and logging users in and out.


Continue to follow along with the user authentication lessons listed under Thursday to implement dialogs, validating user credentials, and displaying errors.

Chat Application

Another very common type of Android application (or feature within larger apps) is instant messaging/chatting. Apps like WhatsApp, Facebook Messenger, and Google Hangouts are all great examples of this. Create an instant messaging application--whether based off of a pre-existing app, or something of your own creation--with the following features:

  • Allow users to register with their own, unique account.
  • Allow users to securely log into their own account using Firebase authentication.
  • Include a User model and save user information to your Firebase database.
  • Allow users to send messages to one another.
  • Implement Firebase listeners that will instantly update a user's app with new messages as they're received.

Much like the discussion forum, this is an incredibly common type of application and/or feature in large applications. Therefore, take the time to ensure you have the beginnings of a great portfolio project that displays your capability of creating the most popular types of mobile apps!

Further Exploration

If you and your partner complete the features detailed above, explore some additional approaches to authenticating users! Many apps now provide users options to sign in via Facebook, Google, and/or Twitter. Using the resources below, research and experiment with implementing social authentication into your chat application:

Peer Code Review

  • Can users successfully sign in and out of the application using Firebase?
  • Can users also sign in and out using a social media account?
  • Are the new features well-implemented? Is the code well-refactored and easy-to-follow?
  • What about this application would you do differently? What might you like to integrate in your own application?