Firebase Flawless Victory! 71 of 100 Days of Code
I finally set up Firebase for my new project!
You can find a video of this at the bottom of the page.
I recreated an empty Android app ListOfNames and did the same for a Firebase project of the same name. After following the steps on the Firebase website, I got Firebase configured as needed.
I registered the app in the Firebase project and, once again, added the Firebase configuration file to the project.
Sure enough, creating a new Android app did the trick! Both App-level and Project-level build.gradle files were finally available! I could finally progress to the next stage, adding the Firebase SDKs to my appĀ (click below)
I pasted the required code from the Firebase website into the Project-level build.gradle file. As for the App-level file, I had to figure out which implementation was appropriate for my project. The sample provides a link to a list of Firebase Android libraries. But how do I implement the Realtime Database?
On the page, I used good old Ctrl + F to find “Realtime Database” and got exactly what I neededĀ (click below)
After updating the App-level build.gradle file, I synced my project and now I’m good to go!
I see why it’s important to understand the entirety of your work. I came to Firebase for the Realtime Database. When I got to the step where I updated the App-level build.gradle file, the Firebase instructions didn’t lead me directly to the code I needed.
I had to do a little digging and figure this part out for myself. Software development isn’t all copy and paste. You gotta use your brains and do some legwork.
Next I need to find out how to connect the realtime database to a ListView in an Android app. This will let me set a list of names in the database to display in the ListOfNames app.
Join the mailing list to see updates like this every week!
Coding Fanatic
Happy Happy Android Image credits to Hather on DeviantArt