can you help me set up Firebase with Android Studio?

I am new to Android Studio and Firebase. I am trying to build a test app linked to my Firebase database. I followed all the instructions.

I copy-paste this in the main Java activity in the oncreate method.

// Write a message to the database
    FirebaseDatabase database = FirebaseDatabase.getInstance();
    DatabaseReference myRef = database.getReference("message");

     myRef.setValue("Hello, World!");

I run the app and everything seems to work fine.
My question is: what is it meant to do exactly?
Where does the msg go and where am I supposed to retrieve it?

Leave a Comment