Connect your android app with firebase
Connect your app to Firebase Install the Firebase SDK . In the Firebase console , add your app to your Firebase project. Add the Real-time Database to your app Add the dependency for Real-time Database to your app-level build.gradle file: implementation 'com.google.firebase:firebase-database:16.0.5' Configure Firebase Database Rules The Real-time Database provides a declarative rules language that allows you to define how your data should be structured, how it should be indexed, and when your data can be read from and written to. By default, read and write access to your database is restricted so only authenticated users can read or write data. To get started without setting up Authentication , you can configure your rules for public access . This does make your database open to anyone, even people not using your app, so be sure to restrict your database again when you set up authentication. Write to your database Retrieve an instance of your