ProteGO-Safe / android

Aplikacja Android
GNU General Public License v3.0
138 stars 44 forks source link

STOP COVID - ProteGO Safe Android app

Logo

Project overview

This is an Android application for STOP COVID - ProteGO Safe project and it implements two main features:

Application is structured based on Clean Architecture pattern and Presentation (UI) layer is almost fully realized with a single Fragment (HomeFragment) with a WebView control that loads a website application called 'PWA'. PWA is responsible for GUI, user interaction and 'User daily triage' feature. A website app interacts with a native code through the JavaScript bridge and is described widely here. Native application business logic is implemented in a HomeViewModel and it decides what kind of UseCase should be executed based on application state. UseCases are defined in a Domain layer and they call methods from proper repository. Repositories implementations are either in a Data module (responsible for everything that is data related - storing, fetching or manipulation) or Device module (device specific APIs not directly related to data).

App implements contact tracing module that is based on ExposureNotification API (EN) and we can extract couple of features related to this:

Project structure

This is multi-module Android Studio Project. It can be compiled with gradle commands, or from Android Studio user interface.

Project modules

Build Variants

Application has 3 flavours matching environments: Prod, Stage, and Dev.

Flavours have different:

There are two build types: release, and debug.

Setup of the app

To get started on the app, setup and configure the following:

  1. ./gradle.properties

  2. Firebase - google-services.json

Config parameters in gradle.properties

Name Description
STAGING_GET_ACCESS_TOKEN_ENDPOINT Endpoint for HTTPS call to validate PIN and get proper access token for TEKs upload (development type of application)
STAGING_UPLOAD_BUCKET_ENDPOINT Endpoint for HTTPS call to upload TEKs (development type of application)
STAGING_STORAGE_BUCKET_ENDPOINT Endpoint for CDN with Diagnosis Keys (development type of application)
STAGING_SAFETYNET_API_KEY SafetyNet device attestation API Key (development type of application)
PRODUCTION_GET_ACCESS_TOKEN_ENDPOINT Endpoint for HTTPS call to validate PIN and get proper access token for TEKs upload (production type of application)
PRODUCTION_UPLOAD_BUCKET_ENDPOINT Endpoint for HTTPS call to upload TEKs (production type of application)
PRODUCTION_STORAGE_BUCKET_ENDPOINT Endpoint for CDN with Diagnosis Keys (production type of application)
PRODUCTION_SAFETYNET_API_KEY SafetyNet device attestation API Key (production type of application)
SHARED_PREFERENCES_FILE_NAME File name for Shared Preferences storage

Firebase and google-services.json

Setup Firebase for the different environment. Download the google-services.json for each of environment and put into proper directory:

Prod: ./app/src/prod/google-services.json

Stage: ./app/src/stage/google-services.json

Dev: ./app/src/dev/google-services.json


ChangeLog

4.13.0

4.12.0

4.11.0

4.10.1

4.10.0

4.9.1

4.9.0

4.8.0

4.7.1

4.7.0

4.6.0

4.5.0

4.4.0

4.3.1

4.3.0

4.2.4

4.2.3

4.2.2

4.2.1

4.2.0

4.1.1

4.1.0

3.0.3

3.0.2

3.0.1

2.0.1