This will create the project in Firebase.
build.gradle
file:compile ‘com.google.firebase:firebase-database:10.2.1’
Now you are ready to work with the Realtime Database in Android.
For example you write a Hello World
message to the database under the message
key.
// Write a message to the database
FirebaseDatabase database = FirebaseDatabase.getInstance();
DatabaseReference myRef = database.getReference("message");
myRef.setValue("Hello, World!");