If you think that you can add a new feature or want to fix a bug, we invite you to contribute to Sleepometer-Android-App and make this project better. To start contributing, follow the below instructions:
-
Create a folder at your desire location (usually at your desktop).
-
Open Git Bash Here
-
Create a Git repository.
Run command
git init
-
Fork this Repo
-
Clone your forked repository of project.
git clone https://github.com/<your_username>/Sleepometer-Android-App.git
- Navigate to the project directory.
cd Sleepometer-Android-App
- Add a reference(remote) to the original repository.
git remote add upstream https://github.com/maityamit/Sleepometer-Android-App.git
- Check the remotes for this repository.
git remote -v
- Always take a pull from the upstream repository to your main branch to keep it updated as per the main project repository.
git pull upstream main
- Create a new branch(prefer a branch name that relates to your assigned issue).
git checkout -b <YOUR_BRANCH_NAME>
-
First update your Android studio to the latest version.
-
To setup firebase for development on your local system, comment out all the firebase dependencies in the app level build.gradle file and run gradle sync.
-
Create a project on Firebase and add the package name of the project sleepometerbyamitmaity.example.sleepometer
-
Register your app with firebase.
-
Enable Google Sign in authentication and Realtime Database in your Firebase project.
-
Add your SHA1 and SHA256 fingerprints to the app in the firebase project settings.
- For windows
keytool -list -v -keystore C:\Users\your_user_name\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
- For mac
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
-
Download the google-services.json file in your firebase project and replace it with the google-services.json present in the cloned project.
-
Uncomment all the firebase dependencies and run gradle sync again.
-
Copy the Oauth client ID from google-services.json (usually on line 18) and paste it into the server client ID in strings.xml.
-
Perform your desired changes to the code base.
-
Check your changes.
git status
git diff
- Stage your changes.
git add . <\files_that_you_made_changes>
- Commit your changes.
git commit -m "relavant message"
- Push the committed changes in your feature branch to your remote repository.
git push -u origin <your_branch_name>
-
To create a pull request, click on
compare and pull requests
. -
Add an appropriate title and description to your PR explaining your changes.
-
Click on
Create pull request
.
Congratulations🎉, you have made a PR to the Sleepometer-Android-App. Wait for your submission to be accepted and your PR to be merged by a maintainer.