Code2College Android Development Class Example Application, instructions on usage below. The application is written in Kotlin using Firebase for backend. The example application provides functionality to:
- Register - using Firebase Authentication and Firebase Real Time Database
- Authenticate - using Firebase Authentication
- Create Posts - using Firebase Real Time Database
- Update Profile - including a profile picture using Firebase Real Time Database and Firebase Storage
-
Download and install Android Studio
-
Fork the following repo: https://github.com/pragmatical/c2clearn
-
Start Android Studio
-
Select File>New>Project From Version Control...
-
Enter the url of your forked repo:
https://github.com/<your-account>/c2clearn.git
-
Click clone - this will take a bit of time but when finished your project will open in Android studio
- In Android Studio open firebase assistant by clicking on Tools>Firebase
- Expand Authentication Section in the Assistant
- In Firebase Assistant click Authenticate Using Google
- Click connect to firebase and log in
- Click on Add Project to add your c2c project and follow instructions to create the project
- When project is created click connect to connect your app to the newly set up firebase project and return to android studio
- Add the Authentication SDK as mentioned in step 2 of assistant
- Navigate to firebase console and open your newly created project
- Navigate to Authentication section and go to Sign-in method
- Select Email/Password, enable email/password and save
- In Android Studio open firebase assistant by clicking on Tools>Firebase
- Expand Realtime Database in the assistant
- Your app should be conected to the database already soset up the dependencies by following steps in the Add Realtime Database to your app
- Navigate to firebase console and open your newly created project
- Click All Products and then Click on Realtime Database
- Click on Create Database
- Follow Steps to create the database ensuring you start the database in test mode, finish by clicking enable in that screen.
- In Android Studio open firebase assistant by clicking on Tools>Firebase
- Expand Cloud Storage for Firebase in the assistant and click get started with cloud storage
- Firebase connection should exist but if not, connect to firebase project
- Your app should be conected to the database already so set up the dependencies by following steps in the Add Realtime Database to your app
- Navigate to firebase console and open your newly created project
- Click All Products and then Click on Storage
- Click on Get Started
- Follow Steps to create storage bucket and ensure you create the storage bucket in test mode.
- To finish the setup select a location and click Done
- Your app should be ready to run in Android Studio
- From Android Studio click Run App
- From running app in emulator click sign up and create your first user
- Navigate to firebase tosee that user created in the Authentication area as well as in the Realtime Database