Lab 3
Lab 3
Initial Set-up:
1. Open your Lab 2 Project
2. Make sure you’re logged into your google account in your browser
3. Open the Firebase Assistant in Android Studio (Tools -> Firebase) and use it to add Cloud
Storage for Firebase SDK to the app
4. Open Build.gradle (Module) and add the following to dependencies:
Firebase:
6. Open console.firebase.google.com in your browser
7. Navigate to your lab project, go to the Storage section in the side bar and enable it in Test mode
8. Upload the Nadella.jpg and Jobs.jpg files in this week’s task folder to Storage
9. Click on the Jobs file after it has been uploaded, a side bar will pop up
10. Click “file location” and copy the storage location to your clipboard (you can do so by just
clicking on the link)
11. Open your Realtime Database and add the link to the database under the photo section like so
(NOTE: your links will be different, do not use these):
Design:
14. Create a new file called MyAppGlideModule.ktl with the following code:
15. Import all the libraries by hovering over the red lines and pressing alt+enter
16. Open PersonAdapter
17. Inside MyViewHolder add a reference to the new ImageView we created with findViewById
18. Inside onBindViewHolder use Glide to display the correct Firebase photo for each database
entry