This is a step-by-step guide for how to create Recycleview expandable list on android studio and to create firebase project using realtime database.
Let’s start with Firebase.
Click on Get Started than add project. A small window will appear; put your project's name then click create project. In the next page, choose your project's app: ios , android or web. In this example, android app is selected.
In order to continue to the next step, a new project on android studio should be created. Fill in the box with the name of package android studio created.
Next, download the json file and follow the instructions.
finally, add the firebase SDK in android studio.
Go to the database, choose Realtime database then open rules page.
Two rules will appear : read and write. If you want to read data, you need to change the value of read to true as illustrated below:
Note : if you want to add data with your application you need to change the value of write to true
When you move to the page "Data" you will find a node which contains a reference to your database .
In order to add a new child, press on the box "+". a new row will appear with two empty text boxes; one for the name and the other for the value. To add a new child, you need to fill in only the name's box and leave the value's box empty then press "+".
Note: in case of filling in the two boxes (name and value), the "+" box will disappear.
Now, fill in the both boxes .
Repeat the previous steps until you make a similar database:
Once done ,move to the next part .
Did you find this article helpful?