This is an Android application for STOP COVID - ProteGO Safe project and it implements two main features: * User daily triage - //TODO description to be provided or linked to main documentation// * Contact tracing - module that is fully based on Exposure Notification API provided by Google and Apple and it's goal is to inform people of potential exposure to COVID-19
App implements contact tracing module that is based on ExposureNotification API (EN) and we can extract couple of features related to this: * Controlling EN: start, stop, check if device supports it, check what is its state * Uploading Temporary Exposure Keys (TEKs) of positively diagnosed user verified by the application: authorize user for TEKs upload, get TEKs from EN, add proper verification data (using SafetyNet API), upload data to the Cloud Server. * Downloading periodically files with batch of TEKs of positively diagnosed users (that recently uploaded their TEKs): execute periodic task responsible for downloading recently created .zip files (it fetches list of available files from CDN, selects only not yet analyzed files and downloads only these ones) * Providing files to EN API for detecting exposures: get proper configuration for risk calculation (Exposure Configuration), fire EN API with list of downloaded files and configuration, delete analyzed files * Receiving information about detected exposures: register broadcast receiver about exposures, get information about exposures, store part of information (day of exposure, risk score and duration that is in 5 minutes intervals but max 30 minutes) * Reporting risk level to the PWA: extract risk scores of saved exposures and calculate risk level, pass risk level to PWA * Removing historical data: remove information about exposures older than 14 days
This is multi-module Android Studio Project. It can be compiled with gradle commands, or from Android Studio user interface.
Application has 3 flavours matching environments: Prod, Stage, and Dev.
Flavours have different:
There are two build types: release, and debug.
To get started on the app, setup and configure the following: 1. ./gradle.properties
| Name | Description | | ---------------------------------- | ------------------------------------------------------------ | | STAGINGGETACCESSTOKENENDPOINT | Endpoint for HTTPS call to validate PIN and get proper access token for TEKs upload (development type of application) | | STAGINGUPLOADBUCKETENDPOINT | Endpoint for HTTPS call to upload TEKs (development type of application) | | STAGINGSTORAGEBUCKETENDPOINT | Endpoint for CDN with Diagnosis Keys (development type of application) | | STAGINGSAFETYNETAPIKEY | SafetyNet device attestation API Key (development type of application) | | PRODUCTIONGETACCESSTOKENENDPOINT| Endpoint for HTTPS call to validate PIN and get proper access token for TEKs upload (production type of application) | | PRODUCTIONUPLOADBUCKETENDPOINT | Endpoint for HTTPS call to upload TEKs (production type of application) | | PRODUCTIONSTORAGEBUCKETENDPOINT | Endpoint for CDN with Diagnosis Keys (production type of application) | | PRODUCTIONSAFETYNETAPIKEY | SafetyNet device attestation API Key (production type of application) | | SHAREDPREFERENCESFILE_NAME | File name for Shared Preferences storage |
Setup Firebase for the different environment. Download the google-services.json for each of environment and put into proper directory: