In Firebase Realtime Database we can store and sync data with our NoSQL cloud database. Data is synced across all clients in realtime, and remains available when your app goes offline.
Here is the one example how to store on firebase and retrieve data on your android device.
First step Create firebase project from https://console.firebase.google.com.
Add the dependency for Firebase Realtime Database to your app-level build.gradle file:
Update the rules for your database to allow reads and writes from all users, as this demo will not cover Firebase Authentication.
1. Create firebase database reference
2. Get data from your form
3. Add and push data on database
4. Update on your view using creating anonymous inner class ChildEventListener.
5. Check you firebase database
Here is the full code:
Update on recyclerview, which show in below git hub link.
Clone the github java
$git clone https://github.com/dharmakshetri/FirebaseAddOrDeleteonDatabase.git
Happy Coding !!!
Home Android Studio Android Tutorials Firebase Firebase: Save, Delete and Retrieve data from firebase database in Android Studio
Firebase: Save, Delete and Retrieve data from firebase database in Android Studio
at 3:38 PM