{"id":44067784,"url":"https://github.com/saivittalb/covsense","last_synced_at":"2026-02-08T03:38:50.117Z","repository":{"id":38780515,"uuid":"258881785","full_name":"saivittalb/covsense","owner":"saivittalb","description":"🦠 An Android based contact tracing app which enables people to self-isolate if they have been in close proximity to someone tested positive for COVID-19. ","archived":false,"fork":false,"pushed_at":"2023-01-09T12:22:48.000Z","size":9718,"stargazers_count":14,"open_issues_count":8,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-11T16:17:57.874Z","etag":null,"topics":["android","contact-tracing","covid-19","firebase","google-api","health-status","java","nearby"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saivittalb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-25T21:52:10.000Z","updated_at":"2024-06-11T16:17:57.875Z","dependencies_parsed_at":"2023-02-08T11:30:57.957Z","dependency_job_id":null,"html_url":"https://github.com/saivittalb/covsense","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saivittalb/covsense","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saivittalb%2Fcovsense","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saivittalb%2Fcovsense/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saivittalb%2Fcovsense/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saivittalb%2Fcovsense/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saivittalb","download_url":"https://codeload.github.com/saivittalb/covsense/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saivittalb%2Fcovsense/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29219276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T03:18:47.732Z","status":"ssl_error","status_checked_at":"2026-02-08T03:15:31.985Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","contact-tracing","covid-19","firebase","google-api","health-status","java","nearby"],"created_at":"2026-02-08T03:38:49.662Z","updated_at":"2026-02-08T03:38:50.112Z","avatar_url":"https://github.com/saivittalb.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CovSense\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3b0fa4c8276e4721b145e75be5ad3b5b)](https://app.codacy.com/manual/saivittalb/covsense?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=saivittalb/covsense\u0026utm_campaign=Badge_Grade_Dashboard)\n[![Version](https://badge.fury.io/gh/saivittalb%2Fcovsense.svg)](https://badge.fury.io/gh/saivittalb%2FCovsense)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![PR's Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com) \n[![GitHub followers](https://img.shields.io/github/followers/saivittalb.svg?style=social\u0026label=Follow)](https://github.com/saivittalb?tab=followers) \n[![Twitter Follow](https://img.shields.io/twitter/follow/saivittalb.svg?style=social)](https://twitter.com/saivittalb) \n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://firebasestorage.googleapis.com/v0/b/poised-elf-275018.appspot.com/o/logo.png?alt=media\u0026token=80d1d621-b2cc-4a0d-8672-b6da83485d86\" height=\"300\" width=\"300\"\u003e\u003c/p\u003e \n\nAn Android based contact tracing app which enables people to self-isolate if they have been in close proximity to someone tested positive for COVID-19. The app uses a combination of Wi-Fi, Bluetooth, BluetoothLE and ultrasonic modem to communicate a unique-in-time pairing code between devices (using the Nearby Messages Google API). This technology can be scaled beyond the demo to work on iOS as well. Furthermore the solution can be embedded in other existing applications as a library to have larger adoption of the contact tracer.\n\nAvailable in Dark and Light themes. Themes are pre-chosen depending on the user system settings. Preview of the app is available below in this document. \n\n## License\nThis project is licensed under the Apache License 2.0, a permissive license whose main conditions require preservation of copyright and license notices. Contributors provide an express grant of patent rights. Licensed works, modifications, and larger works may be distributed under different terms and without source code. Trademark use is also strictly prohibited. Any material found which vandalises or threatens any sort of plagiarism will be strictly given a legal action.\n\n\u003cp align=\"center\"\u003e Copyright (c) 2020 Sai Vittal B. All rights reserved.\u003c/p\u003e\n\n## Preview\n\n### Dark theme \n\u003cp align=\"center\"\u003e\u003cimg src=\"https://firebasestorage.googleapis.com/v0/b/poised-elf-275018.appspot.com/o/DarkThemeScreens.png?alt=media\u0026token=c257b467-c5b9-42a4-89d3-ea5a27f72784\"\u003e\u003c/p\u003e \n\n### Light theme\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://firebasestorage.googleapis.com/v0/b/poised-elf-275018.appspot.com/o/LightThemeScreens.png?alt=media\u0026token=ebcd46f2-7a91-4231-a070-0fa7cfd2379e\"\u003e\u003c/p\u003e \n\n## Android Signed APK build (Debug)\nThe signed ```.apk``` debug build variant of this app that you can install on your Android device is available here in the link below. \\\nhttps://firebasestorage.googleapis.com/v0/b/poised-elf-275018.appspot.com/o/app-debug.apk?alt=media\u0026token=e59d898b-7f66-4055-9a21-48a11fef1e37\n\n## Demo\nA short video demonstration of the app when the health status of one user has been modified is available here in the links below.\\\nhttps://youtu.be/G6MQR8V4Wig \\\nhttps://firebasestorage.googleapis.com/v0/b/poised-elf-275018.appspot.com/o/CovSense%20-%20Android%20Demo.mp4?alt=media\u0026token=d0f71f6a-6a29-415a-8099-7e64fd5d6f40\n\n## Corner cases (known as of now)\n- Tracking does not happen when the user is on a phone call.\n\nIf you discover any failing test cases, you are encouraged to open an issue or a PR regarding it. \n\n## Working\nAfter you sign in, you get an OTP generated using Firebase Phone Authentication. After you login, the application starts a background service that constantly publishes and receives the Firestore Database UIDs, by using the Nearby Messages API from Google. When two devices are in close proximity (approximately 4 metres to 5 metres for Bluetooth + Sonar) their meetup is registered in Firestore.\n\nIn the logged in screen, you can choose your current health status and press the button. This updates your health status in the database. Using Firestore Cloud Messages, there is a JavaScript function that triggers when this update happens and sends a push notification to the users that you have interacted with. \n\n## Components\n- Android codebase in Java \n- Firebase Authentication   (authenticate requests)\n- Firestore                 (database)\n- Nearby Messages API       (contact tracing)\n- Firebase Functions        (serverless code)\n\n###### Note \nDeveloped with Android Studio version 3.6.3.\n\n## Installation\n### Prerequisites\n- Before you begin, make sure your development environment includes [Node.js®](https://nodejs.org/), [yarn](https://classic.yarnpkg.com/) and [npm](https://www.npmjs.com) package managers.\n- Download [Android Studio](https://developer.android.com/studio).\n- Also make sure to create [Google Developers Console](https://console.developers.google.com), [Google Cloud Platform](https://console.cloud.google.com), and [Firebase](https://firebase.google.com) accounts for generating necessary API keys and setting up the project. \n\n### Android app configuration\n- Follow the instructions for setting up your [Google Maps SDK for Android](https://developers.google.com/maps/documentation/android-sdk/start).\n- Follow the instructions for interacting with the [Google Nearby Messages API](https://developers.google.com/nearby/messages/android/get-started).\n- Update your app module \u003cb\u003ebuild.gradle\u003c/b\u003e file with\n    - The \u003cb\u003eAPI_KEY\u003c/b\u003e for the Nearby Messages API, ```API_KEY = \"\\\"YOUR_API_KEY_HERE\\\"\"```.\n    - The \u003cb\u003eMAPS_API_KEY\u003c/b\u003e for the Google Maps SDK for Android, ```MAPS_API_KEY = \"\\\"YOUR_MAPS_API_KEY_HERE\\\"\"```.  \n- Update your \u003cb\u003eAndroidManifest.xml\u003c/b\u003e file in maps meta data with your \u003cb\u003eAPI_KEY\u003c/b\u003e, ```value = \"YOUR_MAPS_API_KEY_HERE\"```.\n- Go to your Firebase console, setup this project, select Android app, add the package name of this app and download \u003cb\u003egoogle-services.json\u003c/b\u003e.\n- Move the \u003cb\u003egoogle-services.json\u003c/b\u003e file you just downloaded into your Android app module root directory.\n- Create a \u003cb\u003egradle.properties\u003c/b\u003e file in the project's root directory and enter the following lines.\n```\nandroid.useAndroidX=true\nandroid.enableJetifier=true\n```\n\n### Database configuration\n- In the Firebase console, open the Authentication section.\n- On the Sign-in Method page, enable the Phone Number sign-in method.\n- Follow the installation guide for [Firestore](https://firebase.google.com/docs/firestore/quickstart).\n- Set up [Firebase Functions](https://firebase.google.com/docs/functions/get-started).\n- Once you complete the Firebase Functions setup, open terminal/console window over the project directory and run following commands.\n```bash\n$ cd ./firestore/functions\n\n$ yarn\n\n$ npm install\n\n$ cd ..\n \n$ firebase deploy --only functions\n```\n\n### JSON schema for Firebase\nTwo tables named \u003cb\u003eusers.json\u003c/b\u003e and \u003cb\u003eusers-meetings.json\u003c/b\u003e are pre-saved in the `./CovSense/firestore` directory.\n    \n## Contributing\n- Fork this project by clicking the ```Fork``` button on top right corner of this page.\n- Open terminal/console window. \n- Clone the repository by running following command in git:\n ```bash\n$ git clone https://github.com/[YOUR-USERNAME]/covsense.git\n```\n- Add all changes by running this command.\n```bash\n$ git add .\n```\n- Or to add specific files only, run this command.\n```bash\n$ git add path/to/your/file\n```\n- Commit changes by running these commands.\n```bash\n$ git commit -m \"DESCRIBE YOUR CHANGES HERE\"\n\n$ git push origin\n```\n- Create a Pull Request by clicking the ```New pull request``` button on your repository page.\n\n[![ForTheBadge built-with-love](http://ForTheBadge.com/images/badges/built-with-love.svg)](https://GitHub.com/saivittalb/) \n[![ForTheBadge powered-by-electricity](http://ForTheBadge.com/images/badges/powered-by-electricity.svg)](http://ForTheBadge.com)\n\n\u003cp align=\"center\"\u003e Copyright (c) 2020 Sai Vittal B. All rights reserved.\u003c/p\u003e\n\u003cp align=\"center\"\u003e Made with ❤ by \u003ca href=\"https://github.com/saivittalb\"\u003eSai Vittal B\u003c/a\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaivittalb%2Fcovsense","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaivittalb%2Fcovsense","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaivittalb%2Fcovsense/lists"}