2-Player Cooperative Quiz using Firebase

Hi folks!

I'm trying to create a basic prototype where:

  1. 2 players type in their usernames
  2. They begin the quiz.
  3. At each question the quiz shows separate texts or images to Player 1 and Player 2 but identical answer options (buttons or textbox).
  4. When Player 1 or 2 inputs the answer, the quiz moves to the next question for both players. If the answer is correct, both players score a point.

I guess my main question is: how to have the app recognize 2 different users, then present the information based on their identifiers?

I'm clearly under skilled for this endeavor, but any help would be appreciated!

So far my point of reference for 2-player multiplayer app was this https://amerkashi.wordpress.com/2016/03/06/firebasechat/

Hi Steponas_D,

You may have to use CloudDB too. CloudDB is useful for 2 users to share data with each other on seperate devices.

I'm making the app right now...

Use Cloud DB

Here's an AIA sample file.

Project4.aia (7.0 KB)

You will also have to make the following changes:

  1. In Firebase DB, input your questions like these:


  1. Reset your Firebase URL in Screen2.

Wow, thank you, @Gordon_Lu !

Had a bit of an issue opening the .aia on Chrome/Firefox: "This project was saved with a newer version of the App Inventor system." , so the blocks are a bit mixed up:

Would you happen to know how to sort it out?

1 Like

Oh sorry I used the test version of MIT Ai2. I’ll give you a new file later.

Use this instead. I've corrected some bugs.

Project4_fixed.aia (7.3 KB)

1 Like