GithubHelp home page GithubHelp logo

covid-19-tracker-android-application's Introduction

CovidTracker

How it works

After you sign in, you get an OTP token generated using Firebase Phone Auth. 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-5m for Bluetooth + Sonar), their meetup is registered in Firestore. From the picker in 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.

Screenshots

Backend

In order to use Backend Services, You have to create API KEY from Google Cloud console and enable Maps SDK for Android and Nearby Message API.

Backend Configuration (Firestore / Functions / Authentication)

Follow the installation guide for Firestore
https://firebase.google.com/docs/firestore/quickstart

Set up Firebase Functions
https://firebase.google.com/docs/functions/get-started

JSON schema for Firebase

After creating the firebase project you have to create Realtime Database Schemas

2 tabels:

  • users

    "users": {
        "user_id1" : {
            "phone" :
        }
        "user_id2" : {
            "phone" :
        }
    }
    
  • users meetings

    "users_meetings" : {
        "user_id1" : {
            "meetings" : {
                "user_id_met1" : {
                    "found_timestamp" : ...
                    "lost_timestamp" : ...
                    "status" : ...
                }
                "user_id_met2" : {
                    "found_timestamp" : ...
                    "lost_timestamp" : ...
                    "status" : ...
                }
            }
        }
        "user_id2" : {
            "meetings" : {
                "user_id_met1" : {
                    "found_timestamp" : ...
                    "lost_timestamp" : ...
                    "status" : ...
                }
                "user_id_met2" : {
                    "found_timestamp" : ...
                    "lost_timestamp" : ...
                    "status" : ...
                }
            }
        }
    }
    

Once you complete the Firebase Functions setup, do the following steps:

  • Goto this repository and look for firestore directory.
  • Execute the following command
cd firestore/functions
npm install
  • Then navigate back to previous directory by cd ../
  • Then run firebase deploy --only functions command to deploy push notification in cloud.

Make sure you have installed Firebase CLI reference
If not installed then Follow the instructions guide for
https://firebase.google.com/docs/cli

Also You have to download your google-services.json file and move it into the project folder.

The Sample APK file is located here


If any problem occur in this project, feel free to contact me : [email protected]

covid-19-tracker-android-application's People

Contributors

aniket-wali avatar dependabot[bot] avatar

Watchers

 avatar

Forkers

ets-android2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.